makes attributeproperty "object-aware"
This commit is contained in:
parent
0c62046224
commit
614a9ab048
1 changed files with 2 additions and 2 deletions
|
|
@ -224,7 +224,7 @@ class AttributeProperty:
|
||||||
category=self._category,
|
category=self._category,
|
||||||
strattr=self._strattr,
|
strattr=self._strattr,
|
||||||
raise_exception=self._autocreate,
|
raise_exception=self._autocreate,
|
||||||
))
|
), instance)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
if self._autocreate:
|
if self._autocreate:
|
||||||
# attribute didn't exist and autocreate is set
|
# attribute didn't exist and autocreate is set
|
||||||
|
|
@ -274,7 +274,7 @@ class AttributeProperty:
|
||||||
"""
|
"""
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def at_get(self, value):
|
def at_get(self, value, obj):
|
||||||
"""
|
"""
|
||||||
The value returned from the Attribute is passed through this method. It can be used
|
The value returned from the Attribute is passed through this method. It can be used
|
||||||
to react to the retrieval or modify the result in some way.
|
to react to the retrieval or modify the result in some way.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue