[Python-3000] Draft PEP for outer scopes

Andrew McNamara andrewm at object-craft.com.au
Thu Nov 2 02:40:59 CET 2006


>Guido wrote:
>> My personal preference is still to abuse 'global' instead of adding a
>> new, ugly keyword. That would make the syntax for global and nonlocal
>> completely identical. :-) But I seem to be alone in this preference.
>
>Brett wrote:
>> Seeing Guido have a sad face is enough to force me to have an opinon.  I
>> personally always viewed 'global' as "this variable is not local", so making
>> it truly mean that works for me.
>
>I'm convinced that "global variable" means top-level for most
>programmers and so this usage would be confusing -- but i think we're
>all just repeating what we've said before.

But it doesn't mean "top-level" - it already comes with the qualifier
"module". Even after nearly a decade of python use, I still find that
slightly unnatural, and changing "global" to mean "enclosing scope"
feels only slightly more unnatural.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Python-3000 mailing list