bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash.#5891
Merged
ericvsmith merged 20 commits intopython:masterfrom Feb 26, 2018
ericvsmith:bpo-32929-dataclasses-unsafe_hash
Merged
bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash.#5891ericvsmith merged 20 commits intopython:masterfrom ericvsmith:bpo-32929-dataclasses-unsafe_hash
ericvsmith merged 20 commits intopython:masterfrom
ericvsmith:bpo-32929-dataclasses-unsafe_hash
Conversation
… simplifies the logic (and explanation) for when __hash__ is added.
Cosmetic fixes.
Contributor
|
Thanks @ericvsmith for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
@ericvsmith: Please replace |
|
GH-5902 is a backport of this pull request to the 3.7 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Feb 26, 2018
…olean unsafe_hash. (pythonGH-5891) unsafe_hash=False is now the default. It is the same behavior as the old hash=None parameter. unsafe_hash=True will try to add __hash__. If it already exists, TypeError is raised. (cherry picked from commit dbf9cff) Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
ericvsmith
added a commit
that referenced
this pull request
Feb 26, 2018
…olean unsafe_hash. (GH-5891) (GH-5902) unsafe_hash=False is now the default. It is the same behavior as the old hash=None parameter. unsafe_hash=True will try to add __hash__. If it already exists, TypeError is raised. (cherry picked from commit dbf9cff) Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue32929