def setdefault(self, filter, value):
    datastore_types.ValidateProperty(' ', value)
    self._CheckFilter(filter, value)
    return dict.setdefault(self, filter, value)
If the filter exists, returns its value. Otherwise sets it to value.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore.py/Query.setdefault