__builtins__ wreidness

Laszlo Zsolt Nagy gandalf at geochemsource.com
Fri Apr 8 06:19:14 EDT 2005


>__builtins__ (plural form) is a CPython implementation detail.
>
>if you want to access the __builtin__ module, import it as usual:
>
>    import __builtin__
>    f = __builtin__.open(...)
>
>if you're interested in CPython implementation details, study the CPython
>source code.
>
></F> 
>  
>
Ok, I agree. I was an idiot. :-) Probably programmers should not use 
__builtins__ at all.
It is still interesting that the same magic identifier is bound to 
different things. :-)


-- 
_________________________________________________________________
  Laszlo Nagy		      web: http://designasign.biz
  IT Consultant		      mail: gandalf at geochemsource.com

     		Python forever!





More information about the Python-list mailing list