Closed e8a9866f-bcc9-4cea-a6ef-b70ac84d2902 closed 7 years ago
On following page: https://docs.python.org/3/glossary.html#term-hashable sentence "All of Python’s immutable built-in objects are hashable, while no mutable containers (such as lists or dictionaries) are." is not complete - probably a word "not" is needed on the end.
I think the original is OK. Adding "not" means the opposite.
Xiang Zhang is correct: the original is technically correct. If you read it like this:
"All of Python’s immutable built-in objects are hashable, while no mutable containers (such as lists or dictionaries) are [hashable]."
it should be clear. But if you have a suggestion for wording which is easier to understand (especially for those whose English is not so good) please say so.
I'm a native speaker, and it's not the greatest sentence. How about:
All of Python’s immutable built-in objects (such as numbers, strings and tuples) are hashable. None of its mutable containers (such as lists or dictionaries) are hashable.
As a non-native speaker, actually I prefer the original one. But both versions lead to no confusion for me.
Just to mention that I'm not native speaker, and I'm Django (Python) beginner. I'm very good in C++, Java and in last 12 years read a lot IT documentation. Mentioned sentence was not clear enough for me so I created this ticket.
The pull request currently suggests “All of Python’s immutable built-in objects are hashable; mutable containers (such as lists or dictionaries) are not.” This seems better wording than the original.
FWIW, I would have tried “Python’s built-in immutable objects are hashable, while mutable containers (such as lists and dictionaries) are not hashable.”
New changeset 64c887ab3a400cf91bde4f0c5ef69eacc88bc5e1 by Senthil Kumaran (csabella) in branch 'master': bpo-26947: DOC: clarify wording on hashable in glossary (#948) https://github.com/python/cpython/commit/64c887ab3a400cf91bde4f0c5ef69eacc88bc5e1
New changeset a71a3ad54d14483cfaebd8e0fb96c97c798d9e32 by Senthil Kumaran in branch '3.6': bpo-26947: DOC: clarify wording on hashable in glossary (#948) (#957) https://github.com/python/cpython/commit/a71a3ad54d14483cfaebd8e0fb96c97c798d9e32
New changeset 51fc7e3d6a29de7b3142e51f8caf4d31f7ac72a0 by Senthil Kumaran in branch '3.5': bpo-26947: DOC: clarify wording on hashable in glossary (#948) (#958) https://github.com/python/cpython/commit/51fc7e3d6a29de7b3142e51f8caf4d31f7ac72a0
I reviewed in the pull request. I agree that the wording was slightly better than the original.
I have to admit, I did not see some of the negative votes in this ticket before merging the patch. If your is opposition is strong, please comment and suggest a better improvement over the patch. thank you!
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at =
created_at =
labels = ['type-bug', 'docs']
title = 'Hashable documentation improvement needed'
updated_at =
user = 'https://bugs.python.org/mPython'
```
bugs.python.org fields:
```python
activity =
actor = 'orsenthil'
assignee = 'docs@python'
closed = True
closed_date =
closer = 'orsenthil'
components = ['Documentation']
creation =
creator = 'mPython'
dependencies = []
files = []
hgrepos = []
issue_num = 26947
keywords = []
message_count = 12.0
messages = ['264805', '264813', '264820', '264822', '264876', '264901', '291007', '291011', '291012', '291013', '291015', '291016']
nosy_count = 7.0
nosy_names = ['orsenthil', 'eric.smith', 'steven.daprano', 'docs@python', 'martin.panter', 'xiang.zhang', 'mPython']
pr_nums = ['948', '957', '958']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue26947'
versions = ['Python 3.5']
```