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
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
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
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
-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
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
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