not at Python Bugs -- __builtins__ madness

Adrian Eyre a.eyre at optichrome.com
Wed Mar 15 12:00:29 EST 2000


> It got the module name wrong.  Unless Python treats __builtins__ THAT
> specially, that's a major goof.  And the 1.5.2 docs say it's
> __builtin__.  This boggles my poor mind.  I'm checking Python Bugs...

It's kinda special, but there's no rule that says a module name must
match the namespace name.

>>> gnirts = __import__("string")
>>> gnirts
<module 'string' from '/usr/local/lib/python1.5/string.pyc'>





More information about the Python-list mailing list