Question about scope

Bjorn Pettersen BPettersen at NAREX.com
Thu Jul 5 17:33:22 EDT 2001


> From: Tim Daneliuk [mailto:tundra at tundraware.com]

<snip>

> 
> I guess what I want to know is when globally declared objects 
> are seen inside a function, class, or
> block, and when they must be explicitly declared as being global.
> 

Whenever you want to assign to them you'll need to declare them as
global (otherwise the Python interpreter thinks you're trying to create
a new local variable).

-- bjorn




More information about the Python-list mailing list