global vars?

Holger Jannsen holger at phoenix-edv.netzservice.de
Mon Jun 14 05:40:47 EDT 1999


Hi,


Gordon McMillan wrote:
> 
>...
> Without some code to demonstrate your confusion, it's difficult to
> guess exactly why you're feeling confused.

Sorry, but I think, you already answered my question.

> In both cases, changing the binding of a global variable requires a
> "global" statement within the function / method. Without that
> statement, Python takes an assignment to the variable (a binding) to
> be local in scope (that is, it's a new variable that exists only
^^^^^^^^^^^^^ ^^^^^^
That's it.

>...
> 
> - Gordon

Thanx,
Holger




More information about the Python-list mailing list