[Python-3000] Ripping out exec
g.brandl at gmx.net
Fri Sep 1 23:28:15 CEST 2006
Guido van Rossum wrote:
> I would just rip it out.
It turns out that it's not so easy. The exec statement currently can
modify the locals, which means that
succeeds. To make that possible, the compiler flags scopes containing
exec statements as unoptimized and does not assume unbound names to
With exec being a function, currently the above function won't work
because "a" is assumed to be global.
I can see only two resolutions:
* change exec() semantics so that it cannot modify the locals
* do not make exec a function
More information about the Python-3000