summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2018-01-28 01:30:37 (GMT)
committerGitHub <noreply@github.com>2018-01-28 01:30:37 (GMT)
commitc4b1248308f051146a50ecc5e31d85d794dc8d05 (patch)
tree460b7cea9a8eaf02c40c4fc9043f002cd5e4df7a /Doc/whatsnew
parentbea57060c863d0c3474c79350bd9c557f2ff0e7c (diff)
downloadcpython-c4b1248308f051146a50ecc5e31d85d794dc8d05.zip
cpython-c4b1248308f051146a50ecc5e31d85d794dc8d05.tar.gz
cpython-c4b1248308f051146a50ecc5e31d85d794dc8d05.tar.bz2
Pep 557 What's New (GH-5371)
Add PEP 557 Data CLasses to What's New.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.7.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 1ece6a3..5e35534 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -311,6 +311,24 @@ environment variable are added to control the UTF-8 mode.
PEP written and implemented by Victor Stinner
+.. _whatsnew37-pep557:
+
+PEP 557: Data Classes
+---------------------
+
+Adds a new module ``dataclasses``. It provides a class decorator
+``dataclass`` which inspects the class's variable annotations (see
+:pep:`526`) and using them, adds methods such as ``__init__``,
+``__repr__``, and ``__eq__`` to the class. It is similar to
+``typing.NamedTuple``, but also works on classes with mutable
+instances, among other features.
+
+.. seealso::
+
+ :pep:`557` -- Data Classes
+ PEP written and implemented by Eric V. Smith
+
+
New Development Mode: -X dev
----------------------------