Python Global State
Scott David Daniels
Scott.Daniels at Acm.Org
Tue Feb 3 12:25:27 EST 2009
Gary Herron wrote:
> er wrote:
>> Simple question, I think: Is there a way to make a completely global
>> variable across a slew of modules?
>
...
>
> Create a module called, perhaps, global.py which contains your variables.
Bad choice of names (a reserved word). Use globals, or data or global_.
Otherwise, the advice is spot-on.
--Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list