[Python-Dev] Inconsistent nesting of scopes in exec(..., locals())
Nick Coghlan
ncoghlan at gmail.com
Sat Apr 24 10:38:55 CEST 2010
Joachim B Haga wrote:
>> Since changing this would break class definitions, that ain't going to
>> happen. Suggestions for how to explain the behaviour more clearly in the
>> exec() documentation probably wouldn't hurt though.
>
> I don't quite see how exec() affects the class definition syntax?
I was merely pointing out that running exec() with separate globals and
locals namespaces ends up invoking the same underlying machinery as is
used to execute a class definition.
For the docs suggestions, could you either email that to
docs at python.org, or else create a documentation issue at
bugs.python.org? (It will get lost otherwise)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev
mailing list