

def __setattr__(self, name, value):
    if (name.startswith('_') or isinstance(getattr(self.__class__, name, None), (Property, property))):
        return super(Expando, self).__setattr__(name, value)
    self._clone_properties()
    if isinstance(value, Model):
        prop = StructuredProperty(Model, name)
    elif isinstance(value, dict):
        prop = StructuredProperty(Expando, name)
    else:
        prop = GenericProperty(name, repeated=isinstance(value, list), indexed=value._default_indexed, write_empty_list=self._write_empty_list_for_dynamic_properties)
    prop._code_name = name
    self._properties[name] = prop
    prop._set_value(self, value)

dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py Expando.__setattr__/VarMisuse@129/146 `self`->`value`