Nick Coghlan added the comment:

First reaction is +1 for finally switching to real constant nodes in the AST 
for 3.4+. This is an inherited behaviour from 2.x where these were ordinary 
names rather than true keywords, so we weren't able to completely disallow 
overwriting them.

As a smaller impact change for earlier versions, we should be able to do 
something in compiler_nameop [1] that picks up the 3 singleton names and allows 
only LOAD_CONST, erroring out otherwise.

http://hg.python.org/cpython/file/default/Python/compile.c#l2625

----------

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

Reply via email to