The namespace for builtin functions?
francisgavila at yahoo.com
Sun Nov 30 06:35:05 CET 2003
Jay O'Connor wrote in message ...
>Blair Hall wrote:
>> Can anyone please tell me how to correctly use a built in function
>> when there is a function of the same name in local scope?
>Save yourself a lot of trouble, just give it a different name.
This is the best advice.
I don't understand why in __main__, the name __builtins__ refers to the
module object __builtin__, but in any other namespace, __builtins__ is the
__dict__ of __builtin__!
--- a.py ---
a = lambda: __builtins__
--- END ---
<module '__builtin__' (built-in)>
>>> import a
Why not 6577648?!
More information about the Python-list