On 10/11/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> My idea was to make the compiler smarter so that it would recognize
> exec() even if it was just a function.
>
> Another idea might be to change the exec() spec so that you are
> required to pass in a namespace (and you can't use locals() either!).
> Then the whole point becomes moot.

I think that's a great idea. It goes a step towards a more analyzable
Python, and really, I've never found a *good* use case for allowing
this invisible munging of locals. I would guess that it would simplify
the implementation, given that there are currently so many special
cases around exec, including when used with nested scopes.

--
 Twisted   |  Christopher Armstrong: International Man of Twistery
  Radix    |    -- http://radix.twistedmatrix.com
           |  Release Manager, Twisted Project
 \\\V///   |    -- http://twistedmatrix.com
  |o O|    |
w----v----w-+
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to