-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
immutable
-> hashable
in the Glossary
#124350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
immutable
-> hashable
in the Glossary
#124350
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks @decorator-factory for the PR, and @Eclips4 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…y of the Glossary (pythonGH-124350) The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable. (cherry picked from commit 6203ef3) Co-authored-by: decorator-factory <[email protected]>
GH-124352 is a backport of this pull request to the 3.13 branch. |
…y of the Glossary (pythonGH-124350) The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable. (cherry picked from commit 6203ef3) Co-authored-by: decorator-factory <[email protected]>
GH-124353 is a backport of this pull request to the 3.12 branch. |
…e` entry of the Glossary (GH-124350) (#124353) Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (GH-124350) The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable. (cherry picked from commit 6203ef3) Co-authored-by: decorator-factory <[email protected]>
…e` entry of the Glossary (GH-124350) (#124352) Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (GH-124350) The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable. (cherry picked from commit 6203ef3) Co-authored-by: decorator-factory <[email protected]>
Dicts accept hashable keys, which is not the same as immutable. For example, user-defined functions are mutable and hashable (so are instances of user-defined classes by default, unless they redefine
__eq__
or set__hash__ = None
).📚 Documentation preview 📚: https://cpython-previews--124350.org.readthedocs.build/