__builtins__

loquehumaine at gmail.com loquehumaine at gmail.com
Fri Feb 8 03:25:14 EST 2008


Hi there,
   I'm a newby in python (I know a little in programmation) and I have
a lot of questions on builtins but my first one is about modules...

I have seen that if I type help() at a prompt, and then 'modules',
I'll be given a list of all modules available, thanks to this group..
But I have seen the differences between them and the one in
dir(__builtins__).
Why are some modules in __builtins__ and others don't ? (UserDict for
example)
Why dir(__builtins__) gives me "math" but not help(__builtins__) ?

What are the differences between __builtins__ and __builtin__ ? (By
the way, I have python 2.4)

Finally, if I do del(__builtins__), what can I do to repair the
"mistake" (as I got an import error __import__ not found if I want to
import __builtins__...?

That's may be obvious for you, but that's all strange to me and I
didn't find answers on the net...



More information about the Python-list mailing list