This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients ppperry, steven.daprano
Date 2015-11-06.00:59:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446771586.43.0.0302074492648.issue25564@psf.upfronthosting.co.za>
In-reply-to
Content
__builtins__ is a private implementation detail in CPython. There is no guarantees made about whether it exists or not. E.g. it doesn't exist in Jython.

steve@orac:~/python$ jython
Jython 2.5.1+ (Release_2_5_1, Aug 4 2010, 07:18:19)
[OpenJDK Server VM (Sun Microsystems Inc.)] on java1.6.0_31
Type "help", "copyright", "credits" or "license" for more information.
>>> __builtins__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name '__builtins__' is not defined

You should use `__builtin__` in Python 2 and `builtins` in Python 3. *Anything* you do to `__builtins__` with an S is implementation-dependent.


I don't think it is a bug that CPython behaves differently regarding __builtins__ depending on whether IDLE is running or not.
History
Date User Action Args
2015-11-06 00:59:46steven.dapranosetrecipients: + steven.daprano, ppperry
2015-11-06 00:59:46steven.dapranosetmessageid: <1446771586.43.0.0302074492648.issue25564@psf.upfronthosting.co.za>
2015-11-06 00:59:46steven.dapranolinkissue25564 messages
2015-11-06 00:59:46steven.dapranocreate