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 mark.dickinson
Recipients ChrisRands, mark.dickinson, rhettinger
Date 2019-06-18.15:59:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560873567.09.0.577604262987.issue37318@roundup.psfhosted.org>
In-reply-to
Content
[Raymond]

> It is just the way the language works.

As far as I can see, the language doesn't need these constants to be in builtins at all - the only reason for keeping them there is backwards compatibility.

As an experiment I tried removing `True`, `False` and `None` from bltinmodule.c, and recompiling, and every single test in the test suite passed just fine. So apparently we're not even testing for the existence of these constants.

It's also fun to note that it's still possible to modify these names:

>>> import builtins
>>> builtins.__dict__["True"] = False
>>> builtins.__dict__["True"] 
False

So I'm not sure what purpose having `True`, `False` and `None` in builtins serves.
History
Date User Action Args
2019-06-18 15:59:27mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, ChrisRands
2019-06-18 15:59:27mark.dickinsonsetmessageid: <1560873567.09.0.577604262987.issue37318@roundup.psfhosted.org>
2019-06-18 15:59:27mark.dickinsonlinkissue37318 messages
2019-06-18 15:59:26mark.dickinsoncreate