Lex Berezhny added the comment:
I don't particularly need this functionality. It was just something that seemed
counter intuitive to me.
I discovered this while working on a python to javascript compiler. I'll
probably implement the compiler to allow overriding with __name__ a
Lex Berezhny added the comment:
The one in __name__ since logically that happens after the class declaration
('class X' line) and should overwrite the name in the class declaration.
--
___
Python tracker
<http://bugs.python.o
Lex Berezhny added the comment:
I think for __class__ it might make sense but for __name__ it seems not
intuitive.
--
___
Python tracker
<http://bugs.python.org/issue14
Changes by Lex Berezhny :
--
versions: +Python 3.3
___
Python tracker
<http://bugs.python.org/issue14092>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Lex Berezhny :
The following behavior doesn't make sense, especially since it works correctly
for other special attributes:
>>> class F:
__name__ = "Foo"
>>> F.__name__
'F'
>>> F().__name__
'Foo'