[issue2040] Class instance attributes that are property() should appear in __dict__
Christian Heimes
report at bugs.python.org
Thu Feb 7 18:45:16 CET 2008
Christian Heimes added the comment:
Descriptors like properties are bound to the class and not to the
instance. The behavior is consistent with class attributes and methods:
>>> class Foo:
... a = 1
... bar = property(lambda self: 'baz')
...
>>> dict(Foo.__dict__)
{'a': 1, '__module__': '__main__', 'bar': <property object at
0xb7d2b4b4>, '__doc__': None}
>>> Foo().__dict__
{}
----------
nosy: +tiran
resolution: -> wont fix
status: open -> closed
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2040>
__________________________________
More information about the Python-bugs-list
mailing list