Pep 557 What's New (GH-5371)

Add PEP 557 Data CLasses to What's New.
This commit is contained in:
Eric V. Smith 2018-01-27 20:30:37 -05:00 committed by GitHub
parent bea57060c8
commit c4b1248308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -311,6 +311,24 @@ environment variable are added to control the UTF-8 mode.
PEP written and implemented by Victor Stinner 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 New Development Mode: -X dev
---------------------------- ----------------------------