Is mymodule.myvariable a 'global'? (What is proper definition of 'global variable'?)

2005-08-21 Thread [EMAIL PROTECTED]
Python lets me access module level variables from *anywhere*.  All I
have
to do is add module name in front.

e.g.

mymodule.myvariable

Is this considered a 'global'?  Or, does a 'global variable' have to be
accessible anywhere *without* a namespace in front?

(I'm not sure what proper academic definition of 'global variable' is.)

Thanks!

Chris

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is mymodule.myvariable a 'global'? (What is proper definition of 'global variable'?)

2005-08-21 Thread Michael Ekstrand
On 21 Aug 2005 09:45:26 -0700
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Python lets me access module level variables from *anywhere*.  All I
 have
 to do is add module name in front.
 
 e.g.
 
 mymodule.myvariable
 
 Is this considered a 'global'?  Or, does a 'global variable' have to
 be accessible anywhere *without* a namespace in front?

Whether or not it is a true academic global, such a variable is what
Python calls a global. There is no way to make a variable universally
accessible without a namespace.

-Michael
-- 
http://mail.python.org/mailman/listinfo/python-list