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.

classification
Title: Fix is/== misuse
Type: enhancement Stage: patch review
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, ezio.melotti, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2012-10-09 09:54 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
is_int_or_str.patch serhiy.storchaka, 2012-10-09 09:54 review
equals_none_or_bool.patch serhiy.storchaka, 2012-10-09 09:55 review
Messages (3)
msg172467 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-09 09:54
Here are two patches written on the discussion in Python-Ideas [1].

The first patch fixes incorrect use of "x is 0" or "x is 'foo'". Result of this operations is implementation details.

The second patch changes non-idiomatic use of "x == None" or "x == True".

[1] http://comments.gmane.org/gmane.comp.python.ideas/16547
msg172485 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-10-09 15:16
New changeset 842276ae4a3f by Benjamin Peterson in branch '3.3':
compare with equality not identity (issue #16172)
http://hg.python.org/cpython/rev/842276ae4a3f
msg172486 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-10-09 15:17
Also http://hg.python.org/cpython/rev/332b93ce7bf9
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60376
2012-10-09 15:17:48benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg172486

resolution: fixed
2012-10-09 15:16:41python-devsetnosy: + python-dev
messages: + msg172485
2012-10-09 09:56:55ezio.melottisetnosy: + ezio.melotti

components: + Tests
stage: patch review
2012-10-09 09:55:40serhiy.storchakasetfiles: + equals_none_or_bool.patch
2012-10-09 09:54:54serhiy.storchakacreate