def _get_attributes(schema, location):
        """Return the schema's children, filtered by location."""
        schema = DottedNameResolver(__name__).maybe_resolve(schema)

        def _filter(attr):
            if not hasattr(attr, "location"):
                valid_location = 'body' in location
            else:
                valid_location = attr.location in to_list(location)
            return valid_location

        return list(filter(_filter, schema().children))
def _get_attributes ( schema , location ) : schema = DottedNameResolver ( __name__ ) . maybe_resolve ( schema ) def _filter ( attr ) : if not hasattr ( attr , "location" ) : valid_location = 'body' in location else : valid_location = attr . location in to_list ( location ) return valid_location return list ( filter ( _filter , schema ( ) . children ) )
Return the schema's children, filtered by location.