This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients georg.brandl, ncoghlan, pmawhorter
Date 2009-11-13.22:38:19
SpamBayes Score 5.641473e-06
Marked as misclassified No
Message-id <1258151901.88.0.456111918187.issue7286@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2009-11-13 22:38:21ncoghlansetrecipients: + ncoghlan, georg.brandl, pmawhorter
2009-11-13 22:38:21ncoghlansetmessageid: <1258151901.88.0.456111918187.issue7286@psf.upfronthosting.co.za>
2009-11-13 22:38:20ncoghlanlinkissue7286 messages
2009-11-13 22:38:19ncoghlancreate