Re: Suggestion: Python global scope

2008-07-15 Thread alex23
Anonymous Bastard wrote: > In Python, declaring a variable using the global statement automatically > makes it available in all subsequent scopes. > > But to me, it makes more sense to use the global statement to 'import' a > variable from the global scope into the current scope. My understanding

Re: Suggestion: Python global scope

2008-07-15 Thread Carl Banks
On Jul 15, 7:57 am, Anonymous Bastard <[EMAIL PROTECTED]> wrote: > I've been tossing this idea in my mind for some time now: > > In Python, declaring a variable using the global statement automatically > makes it available in all subsequent scopes. > > But to me, it makes more sense to use the glob

Re: Suggestion: Python global scope

2008-07-15 Thread André
On Jul 15, 10:13 am, Nick Dumas <[EMAIL PROTECTED]> wrote: > The function of the global keyword is to 'push' local variables to the > global scope. If you want to 'import' a variable into a local scope, > pass the variable to your function/method as an argument. > Anonymous Bastard wrote: > > I've

Re: Suggestion: Python global scope

2008-07-15 Thread John Roth
On Jul 15, 5:57 am, Anonymous Bastard <[EMAIL PROTECTED]> wrote: > I've been tossing this idea in my mind for some time now: > > In Python, declaring a variable using the global statement automatically > makes it available in all subsequent scopes. > > But to me, it makes more sense to use the glob

Re: Suggestion: Python global scope

2008-07-15 Thread Nick Dumas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The function of the global keyword is to 'push' local variables to the global scope. If you want to 'import' a variable into a local scope, pass the variable to your function/method as an argument. Anonymous Bastard wrote: > I've been tossing this ide

Re: Suggestion: Python global scope

2008-07-15 Thread Gerhard Häring
Anonymous Bastard wrote: I've been tossing this idea in my mind for some time now: In Python, declaring a variable using the global statement automatically makes it available in all subsequent scopes. But to me, it makes more sense to use the global statement to 'import' a variable from the

Suggestion: Python global scope

2008-07-15 Thread Anonymous Bastard
I've been tossing this idea in my mind for some time now: In Python, declaring a variable using the global statement automatically makes it available in all subsequent scopes. But to me, it makes more sense to use the global statement to 'import' a variable from the global scope into the curr