New submission from Neal Norwitz <[EMAIL PROTECTED]>: This happens on 2.4 and 3.0, probably all versions:
When running this simple program (save to a file): print(type(__builtins__)) __import__(__file__.split('/')[-1][:-3]) I get: <type 'module'> <type 'dict'> I would expect the type to be consistent regardless of whether executing the main module or from the imported module. I haven't looked into why this is happening or if it makes sense. It was unexpected. ---------- components: Interpreter Core messages: 77252 nosy: nnorwitz severity: normal status: open title: type of __builtins__ changes if in main module or not type: behavior _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4582> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com