Globals

Terry Reedy tjreedy at udel.edu
Thu Oct 17 16:51:38 CEST 2002


"Newt" <newt_e at blueyonder.co.uk> wrote in message
news:U4hr9.3651$KL.23673098 at news-text.cableinet.net...
> global strVar
> global iVar

The global statement is only used within functions to specify that a
variable being assigned to within the function is global to the module
and not local to the function (which it automatically would be without
the global statement).  Importing a module into many modules in order
to share values across modules is another matter entirely.

TJR





More information about the Python-list mailing list