[issue28891] Standardise more behaviours for zero-argument super() __class__ and __classcell__

Nick Coghlan report at bugs.python.org
Tue Dec 6 20:36:23 EST 2016


Nick Coghlan added the comment:

Breaking the concrete proposal out to its own post:

- for CPython, "nonlocal __class__" becomes a SyntaxError generated by the symbol table pass in the compiler in 3.7+ and a DeprecationWarning in 3.6.1+
- other implementations (including PyPy) can just make "nonlocal __class__" a SyntaxError immediately
- an explicit test be added to https://hg.python.org/cpython/file/default/Lib/test/test_super.py for 3.6+ that "__class__" and "__classcell__" don't show up in the class locals() during execution of the class body

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28891>
_______________________________________


More information about the Python-bugs-list mailing list