[issue14092] __name__ inconsistently applied in class definition
Benjamin Peterson
report at bugs.python.org
Thu Feb 23 02:09:43 CET 2012
Benjamin Peterson <benjamin at python.org> added the comment:
I don't think this is actually incorrect. Basically setting something in the class body is not equivalent to setting it as an attribute on the class.
This happens with other attributes. Consider
>>> class X:
... __class__ = list
...
>>> X.__class__
<class 'type'>
>>> X().__class__
<class 'list'>
----------
nosy: +benjamin.peterson
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14092>
_______________________________________
More information about the Python-bugs-list
mailing list