I thought I'd 'got' globals but...

Luis M. González luismgz at gmail.com
Fri Jul 7 20:45:06 EDT 2006


Markus Wankus wrote:
> On Fri, 07 Jul 2006 19:41:36 -0400, Luis M. González <luismgz at gmail.com>
> wrote:
> .
> .
> > OK, so I should include the global only if I plan to modify it.
> > Otherwise, I don't need to include it. Am I right?
> >
>
> Correct.  Globals are always available to read from.  You need to declare
> them if you want to modify them in another scope.  Like nate, I also tend
> to declare them all the time if I am going to use them, just for clarity.
> 
> M.

Thank you guys!
Luis




More information about the Python-list mailing list