Message282535
(B9) CPython 3.5.2: this ``nonlocal`` seems not to have a reasonable
effect (note that if we use a different name instead of ``__class__``,
this example correctly complain that there is no binding in the outer
scope of ``Y``)::
class Y:
class X:
nonlocal __class__
__class__ = 42
print(locals()['__class__']) # 42
print(__class__) # but this is a NameError |
|
Date |
User |
Action |
Args |
2016-12-06 11:59:25 | arigo | set | recipients:
+ arigo |
2016-12-06 11:59:25 | arigo | set | messageid: <1481025565.28.0.169524902167.issue28884@psf.upfronthosting.co.za> |
2016-12-06 11:59:25 | arigo | link | issue28884 messages |
2016-12-06 11:59:25 | arigo | create | |
|