Variable passing between modules.

Terry Reedy tjreedy at udel.edu
Thu Sep 9 21:51:02 EDT 2004


> If you really need a big set of global variables (a practice which, in 
> general, I'd recommend avoiding), then at very least you should create a 
> globals.py module which contains nothing but these  variables.  Other 
> modules can then 'import globals; print globals.myvar'

I suggest another name since this will mask the builtin globals().

tjr






More information about the Python-list mailing list