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: typo in __hash__ docs
Type: Stage: resolved
Components: Documentation Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Antony.Lee, docs@python, r.david.murray
Priority: normal Keywords:

Created on 2017-08-28 19:42 by Antony.Lee, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg300961 - (view) Author: Antony Lee (Antony.Lee) * Date: 2017-08-28 19:42
In https://docs.python.org/3.7/reference/datamodel.html#object.__hash__ I think

x.__hash__() returns an appropriate value such that x == y implies both that x is y and hash(x) == hash(y).

should be

x.__hash__() returns an appropriate value such that x == y and x is y both imply that hash(x) == hash(y).

right?
msg300964 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-08-28 20:00
No, it is correct as worded.  It is talking about the default methods.  With the default methods, x == y implies that x is y.
History
Date User Action Args
2022-04-11 14:58:51adminsetgithub: 75476
2017-08-28 20:00:57r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg300964

resolution: not a bug
stage: resolved
2017-08-28 19:42:50Antony.Leecreate