April 26, 2002
4:23 p.m.
"GN" == Gustavo Niemeyer <niemeyer@conectiva.com> writes:
Note too that we can't change the generated code at all for 2.3 unless under the control of a new future statement, else existing None-abusing code could break.
GN> I'm trying to eat the cake and have it too, by detecting if None GN> is being abused and disabling the change of LOAD_GLOBAL to GN> LOAD_CONST. If it works (and probably will), we may then choose GN> to include warnings, keep it that way forever, or whatever. This can't be detected statically, because a global could be introduced dynamically: foo.py: def f(): return None
import foo foo.None = 12 foo.f() 12
Jeremy