Safe to import __builtin__ ?

MRAB python at mrabarnett.plus.com
Tue Jun 2 16:44:58 EDT 2009


mrstevegross wrote:
> Is it generally safe to explicitly import __builtin__ in python? That
> is, my code reads like this:
> 
> === foo.py ===
> import __builtin__
> ...
> print __builtin__.type('a')
> === EOF ===
> 
> It seems like it should be a safe import, but I just want to make
> sure.
> 
Why do you want to import it?

See http://docs.python.org/library/__builtin__.html



More information about the Python-list mailing list