Meador Inge <mead...@gmail.com> added the comment:

Ouch.  The '__class__' behavior is documented here too: 
http://docs.python.org/py3k/library/functions.html?highlight=__class__#super.  
Unfortunately I don't see any other documentation on the lexically scoped form 
of __class__.

As implied, cases like the following just don't work any longer:

>>> class X(object):
...    def __init__(self):
...       super(__class__, self).__init__()
... 
>>> X()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in __init__
NameError: global name '__class__' is not defined

This worked fine in 3.2.

----------
nosy: +meador.inge

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14857>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to