

def _set_attributes(self, kwds):
    'Internal helper to set attributes from keyword arguments.\n\n    Expando overrides this.\n    '
    cls = self.__class__
    for (name, value) in kwds.iteritems():
        prop = getattr(cls, name)
        if (not isinstance(prop, Property)):
            raise TypeError(('Cannot set non-property %s' % name))
        prop._set_value(self, value)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Model._set_attributes/original