March 11, 2001
3:37 p.m.
When Guido says he intends to "deprecate" exec-without-in, he should also always say "and also deprecate exec in locals()/global() too". But he'll have to think about that and get back to you <wink>.
Actually, I intend to deprecate locals(). For now, globals() are fine. I also intend to deprecate vars(), at least in the form that is equivalent to locals().
Note that modifications to locals() already have undefined behavior (according to the Ref Man), so exec-in-locals() is undefined too if the exec'ed code tries to (re)bind any names.
And that's the basis for deprecating it. --Guido van Rossum (home page: http://www.python.org/~guido/)