[New-bugs-announce] [issue2040] Class instance attributes that are property() should appear in __dict__
Jag Ginsberg
report at bugs.python.org
Thu Feb 7 18:38:48 CET 2008
New submission from Jag Ginsberg:
If I have a class:
class Foo(object):
bar = property(lambda self: 'baz') # ignore the value's trivial nature
and then run:
>>> foo_obj = Foo()
>>> foo_obj.__dict__
... I would expect to see:
{'bar': 'baz'}
... and not:
{}
This would seem consistent with what a property is supposed to
masquerade as. Do you disagree?
-jag
----------
components: Interpreter Core
messages: 62159
nosy: jag
severity: minor
status: open
title: Class instance attributes that are property() should appear in __dict__
type: behavior
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2040>
__________________________________
More information about the New-bugs-announce
mailing list