def setdefault(self, name, value):

    datastore_types.ValidateProperty(name, value)
    return dict.setdefault(self, name, value)
If the property exists, returns its value. Otherwise sets it to value.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/datastore.py/Entity.setdefault