Georg Brandl ge...@python.org added the comment:
That seems a little strange to me, because if an object is instance of
a class, it should inherit all of it attributes.
An instance does not inherit attributes of its class. Instead, when
looking up an attribute for an instance, attributes of
New submission from Andrew Shuiu as...@bitdefender.com:
Interpreter do not fill in __dict__ attribute of a class which has atributes.
dir() shows them, but not __dict__. It works only when attributes are created
dynamically at runtime, such as class.attribute = value, not in class
definition.
R. David Murray rdmur...@bitdance.com added the comment:
That's because the attribute values don't exist in the instance until you make
an assignment to them. Before that the exist only as class attributes.
--
nosy: +r.david.murray
priority: - normal
resolution: - invalid
stage: -
Andrew Shuiu as...@bitdefender.com added the comment:
Hello Murray,
That seems a little strange to me, because if an object is instance of
a class, it should inherit all of it attributes.
Is it an optimization issue? because I observed that all
instances of a class that has such static