Safe to import __builtin__ ?

Benjamin Peterson benjamin at python.org
Wed Jun 3 14:57:29 EDT 2009


mrstevegross <mrstevegross <at> gmail.com> writes:

> 
> Is it generally safe to explicitly import __builtin__ in python? That
> is, my code reads like this:
...
> 
> It seems like it should be a safe import, but I just want to make
> sure.

Yes, that's fine. I'm not sure why you don't just use type(), though.







More information about the Python-list mailing list