Message177023
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 |
|
Date |
User |
Action |
Args |
2012-12-06 02:55:02 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, georg.brandl, terry.reedy, ikelly, Horpner, benjamin.peterson, mrabarnett, steven.daprano, alex, cvrebert, meador.inge, python-dev, DragonFireCK, bruno.dupuis |
2012-12-06 02:55:01 | ncoghlan | set | messageid: <1354762501.94.0.324594703849.issue16619@psf.upfronthosting.co.za> |
2012-12-06 02:55:01 | ncoghlan | link | issue16619 messages |
2012-12-06 02:55:01 | ncoghlan | create | |
|