classification
Title: Clarify built-in types comparisons
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Windson Yang, docs@python, gvanrossum, iritkatriel, miss-islington, njs, zach.ware
Priority: normal Keywords: patch

Created on 2018-08-31 05:37 by Windson Yang, last changed 2020-10-08 22:06 by gvanrossum. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9035 merged Windson Yang, 2018-09-02 16:16
Messages (4)
msg324403 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-08-31 05:37
In https://docs.python.org/3.5/library/stdtypes.html#comparisons 

"some types (for example, function objects) support only a degenerate notion of comparison where any two objects of that type are unequal."

We had some discussion at zulipchat already:

"more seriously: I think we can just delete that sentence. The next sentence makes clear that < and friends arne't always defined, and the sentence after that notes that == defaults to is if there's nothing better." - by Nathaniel J. Smith

IMO, I think we should also clarify the relationship between "==", "is" and "__eq__".
msg325324 - (view) Author: miss-islington (miss-islington) Date: 2018-09-14 04:50
New changeset 1aeba7458d2aaf8a03b5d443179d122ceb2ccece by Miss Islington (bot) (Windson yang) in branch 'master':
bpo-34552: Clarify built-in types comparisons (GH-9035)
https://github.com/python/cpython/commit/1aeba7458d2aaf8a03b5d443179d122ceb2ccece
msg378287 - (view) Author: Irit Katriel (iritkatriel) * (Python triager) Date: 2020-10-08 21:53
This seems complete, can it be closed?
msg378289 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-10-08 22:06
Yup. Thanks for catching this!
History
Date User Action Args
2020-10-08 22:06:03gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg378289

stage: patch review -> resolved
2020-10-08 21:53:09iritkatrielsetnosy: + iritkatriel
messages: + msg378287
2018-09-14 04:50:24miss-islingtonsetnosy: + miss-islington
messages: + msg325324
2018-09-02 16:16:15Windson Yangsetkeywords: + patch
stage: patch review
pull_requests: + pull_request8497
2018-08-31 05:37:52Windson Yangcreate