[Python-3000] Draft PEP for outer scopes
andrewm at object-craft.com.au
Thu Nov 2 06:24:12 CET 2006
>Andrew McNamara wrote:
>> But it doesn't mean "top-level" - it already comes with the qualifier
>The global scope is the widest scope in which you can declare a variable.
This is inaccurate at best. The reality is:
Python's "global" is module-global, yet there's a wider scope that is
searched after the module namespace: the __builtin__ module.
C has a similar concept module-global (module "static" variables), but
if I remember correctly Perl does not (globals are interpreter-global),
each document essentially a separate interpreter instance).
To be honest, I'm +0 on using "global" in the way GvR proposes. My
point is that python's globals are already different from other common
languages, and people cope with that.
Andrew McNamara, Senior Developer, Object Craft
More information about the Python-3000