Global in multiple files

James Logajan JamesL at Lugoj.Com
Mon Jun 11 20:48:36 EDT 2001


Chris Barker wrote:
...
> Artur Skura wrote:
...
> > (BTW I would like to thank other people for pointing out the
> > possibility of having global.py module etc.
...
> In fact, it may make sense to put accessor functions in your globals
> module, like:
> 
> globals.getUserList()
...

Warning! Do not name such a module "globals.py" because "globals" is already
a function in the global namespace. That is why I suggested "globalVars.py".
The singular, "global" shouldn't collide with any existing names, but may be
prone to confusion with the plural. You could always emulate Fortran and
call it "common.py"....

Just a word to the wise.



More information about the Python-list mailing list