The rules of reference

Emile van Sebille emile at
Thu Oct 31 20:12:04 CET 2002

Gerson Kurz, discovering the difference in __main__ and import:
> Frankly, I'm stunned.

The imported 'a' module is not __main__, ergo the different namespaces
by the time 'b'.  You can probably see this if you include a print
__name__ at the top of 'a'.  I'd expect you'll see the difference upon
importing 'a'.



Emile van Sebille
emile at


More information about the Python-list mailing list