packages, globals, and __builtin__

Laura Creighton lac at cd.chalmers.se
Thu May 10 20:52:23 CEST 2001


I'm making a package, with one class per file name.  I want a global
variable to keep state in which I can access from any module.  So I
import __builtin__ and assign something to __builtin__.StateVariable.
This works great.  But I am feeling squeamish about this.  Should I be?

Laura




More information about the Python-list mailing list