Customizing module globals

Ignacio Vazquez-Abrams ignacio at openservices.net
Fri Sep 7 17:17:57 EDT 2001


On Fri, 7 Sep 2001, Fredrik Lundh wrote:

> you can install things in the __builtin__ module at any time:
>
>     import __builtin__
>     __builtin__.Object = something
>
> using this to fake "true globals" is a pretty lousy idea, imho.

Wouldn't it be easier just to use globals()?

  globals()['Object']=something

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list