classification
Title: Confusing period in object.__hash__ doc
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: AlexWaygood, JMcB17, docs@python, rhettinger
Priority: normal Keywords: patch

Created on 2021-12-08 12:37 by JMcB17, last changed 2021-12-11 01:12 by AlexWaygood.

Pull Requests
URL Status Linked Edit
PR 29989 open JMcB17, 2021-12-08 12:40
Messages (2)
msg408014 - (view) Author: JMcB (JMcB17) * Date: 2021-12-08 12:37
At https://docs.python.org/3/reference/datamodel.html#object.__hash__
It says:
Called by built-in function hash() and for operations on members of hashed collections including set, frozenset, and dict. __hash__() should return an integer.

How it's rendered there, the kerning made it confusing to me on a first read because dict. [new sentence]__hash__() looked like dict.__hash__().

I think a line break should be added, which I'll open a pr to do.
msg408036 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-12-08 16:31
A line break would look weird.  Let's add plain English instead.

-   including set, frozenset, and dict. __hash__() should return an integer.
+   including set, frozenset, and dict. The __hash__() method should return an integer.
History
Date User Action Args
2021-12-11 01:12:04AlexWaygoodsetnosy: + AlexWaygood
2021-12-08 16:31:10rhettingersetnosy: + rhettinger
messages: + msg408036
2021-12-08 12:40:31JMcB17setkeywords: + patch
stage: patch review
pull_requests: + pull_request28212
2021-12-08 12:37:28JMcB17create