Using the __builtins__ module to assign new global variables

Scott David Daniels Scott.Daniels at Acm.Org
Mon Mar 1 19:49:46 EST 2004


Opinder wrote:

> Are there any side effects in assigning new variables to the
> __builtins__ module for the purpose of exposing variables to imported
> modules.

Generally, Guido frowns at you very sternly.  Also, you could
cause a disaster if there is a conflict between your idea of what
should be a global and some other module's idea.  You will be in
big trouble if a builtin is added that you over-write (actually
a form of the same problem).

-- 
-Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list