summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2018-02-26 02:30:17 (GMT)
committerGitHub <noreply@github.com>2018-02-26 02:30:17 (GMT)
commitdbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38 (patch)
treeb44951c74baf95d62b496746de64cb6434896d5d /Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst
parent9c17e3a1987004b8bcfbe423953aad84493a7984 (diff)
downloadcpython-dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38.zip
cpython-dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38.tar.gz
cpython-dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38.tar.bz2
bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash. (#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.
Diffstat (limited to 'Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst')
-rw-r--r--Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst b/Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst
new file mode 100644
index 0000000..b8a470c
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-02-25-13-47-48.bpo-32929.X2gTDH.rst
@@ -0,0 +1,6 @@
+Remove the tri-state parameter "hash", and add the boolean "unsafe_hash". If
+unsafe_hash is True, add a __hash__ function, but if a __hash__ exists,
+raise TypeError. If unsafe_hash is False, add a __hash__ based on the
+values of eq= and frozen=. The unsafe_hash=False behavior is the same as
+the old hash=None behavior. unsafe_hash=False is the default, just as
+hash=None used to be.