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

Created on 2018-08-31 05:37 by Windson Yang, last changed 2018-09-14 04:50 by miss-islington.

Pull Requests
URL Status Linked Edit
PR 9035 merged Windson Yang, 2018-09-02 16:16
Messages (2)
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
History
Date User Action Args
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