Safe to import __builtin__ ?

mrstevegross mrstevegross at
Wed Jun 3 23:33:02 CEST 2009

> Yes, it's safe (and this is what the ‘__builtin__’ module is intended
> for: <URL:>).
> Be careful, though: there's a separate name, ‘__builtins__’, that is
> *not* meant to be imported. It's also implementation-specific, so
> shouldn't be relied upon. My advice: don't use ‘__builtins__’ at all,
> but be aware that it exists so you spell ‘__builtin__’ correctly.



More information about the Python-list mailing list