M
Michael Hohn
Hi,
using the file builtin_check.py with content
# Module builtin_check
# Inconstency in the binding of __builtins__
def get_binding(name):
return locals()[name]
def get_global_binding(name):
return globals()[name]
and running
import builtin_check
print type(builtin_check.get_global_binding('__builtins__'))
print type(__builtins__)
in the toplevel, I get the following results:
Python 2.2.3 (#2, Jun 16 2004, 21:14:24)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.<type 'module'>
Python 2.3.3 (#1, May 10 2004, 11:29:59)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.<type 'module'>
Is this difference in return value intentional?
Thanks,
Michael
using the file builtin_check.py with content
# Module builtin_check
# Inconstency in the binding of __builtins__
def get_binding(name):
return locals()[name]
def get_global_binding(name):
return globals()[name]
and running
import builtin_check
print type(builtin_check.get_global_binding('__builtins__'))
print type(__builtins__)
in the toplevel, I get the following results:
Python 2.2.3 (#2, Jun 16 2004, 21:14:24)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.<type 'module'>
Python 2.3.3 (#1, May 10 2004, 11:29:59)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.<type 'module'>
Is this difference in return value intentional?
Thanks,
Michael