Message161215
| Author |
meador.inge |
| Recipients |
Arfrever, daniel.urban, meador.inge, ncoghlan |
| Date |
2012年05月20日.16:12:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1337530379.82.0.63040270992.issue14857@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年05月20日 16:12:59 | meador.inge | set | recipients:
+ meador.inge, ncoghlan, Arfrever, daniel.urban |
| 2012年05月20日 16:12:59 | meador.inge | set | messageid: <1337530379.82.0.63040270992.issue14857@psf.upfronthosting.co.za> |
| 2012年05月20日 16:12:59 | meador.inge | link | issue14857 messages |
| 2012年05月20日 16:12:59 | meador.inge | create |
|