[issue2040] Class instance attributes that are property() should appear in __dict__
Amaury Forgeot d'Arc
report at bugs.python.org
Thu Feb 7 21:51:25 CET 2008
Amaury Forgeot d'Arc added the comment:
Well, a regular method also takes "self" as its first argument. And it
will not appear in the instance's __dict__.
The __dict__ of an object is intended to *store* its attributes.
A property can be accessed like an attribute (foo_obj.bar), but it is
computed each time, and not stored.
Do you know the dir() function? It returns the names of all known
attributes of a object, including properties and methods.
----------
nosy: +amaury.forgeotdarc
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2040>
__________________________________
More information about the Python-bugs-list
mailing list