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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to