Customizing module globals

Kerim Borchaev ( WarKiD ) warkid at
Mon Sep 10 11:17:20 CEST 2001

>> 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.

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

IVA>   globals()['Object']=something

As I understand this only modifies current module's globals. Not
globals that will be created for imported module.

Best regards,
 Kerim                            mailto:warkid at

More information about the Python-list mailing list