def ParseNamespaceQuery(query, filters, orders):

  if query.has_ancestor():
    raise BadRequestError('ancestor queries on __namespace__ not allowed')

  key_range = ParseKeyFilteredQuery(filters, orders)
  key_range.Remap(_NamespaceKeyToString)

  return key_range
Parse __namespace__  queries.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/old_datastore_stub_util.py/ParseNamespaceQuery