Nick Coghlan <ncogh...@gmail.com> added the comment: This is a largely inevitable consequence of the conversion from a statement to a function - the interpreter eval loop for the exec statement used to do some fancy footwork to make locals() modifications work, but with exec becoming just another builtin function that special casing is gone.
Accordingly, in 3.x, exec() is dependent on the implementation defined behaviour of locals(), just like all other code. (The upside to this is that it means the compiler always knows the identity of all local variables). I have no idea how well this change has been documented though (to be honest, I'd forgotten that exec had been converted to a function for 3.x) ---------- components: -Interpreter Core nosy: +ncoghlan _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7286> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com