summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2018-01-28 00:07:40 (GMT)
committerGitHub <noreply@github.com>2018-01-28 00:07:40 (GMT)
commitea8fc52e75363276db23c6a8d7a689f79efce4f9 (patch)
treeca662ba631df1f6e6e32b5b0d95a6b5458d5699c /Misc
parent2a2247ce5e1984eb2f2c41b269b38dbb795a60cf (diff)
downloadcpython-ea8fc52e75363276db23c6a8d7a689f79efce4f9.zip
cpython-ea8fc52e75363276db23c6a8d7a689f79efce4f9.tar.gz
cpython-ea8fc52e75363276db23c6a8d7a689f79efce4f9.tar.bz2
bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)
Class authors no longer need to specify repr=False if they want to provide a custom __repr__ for dataclasses. The same thing applies for the other dunder methods that the dataclass decorator adds. If dataclass finds that a dunder methods is defined in the class, it will not overwrite it.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-01-27-11-20-16.bpo-32513.ak-iD2.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-01-27-11-20-16.bpo-32513.ak-iD2.rst b/Misc/NEWS.d/next/Library/2018-01-27-11-20-16.bpo-32513.ak-iD2.rst
new file mode 100644
index 0000000..4807241
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-01-27-11-20-16.bpo-32513.ak-iD2.rst
@@ -0,0 +1,2 @@
+In dataclasses, allow easier overriding of dunder methods without specifying
+decorator parameters.