Skip to content

Commit

Permalink
Don't special case named tuples. The default behavior is fine. (#1874)
Browse files Browse the repository at this point in the history
markshannon authored Mar 16, 2021
1 parent 31d8143 commit 54a16d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pep-0653.rst
Original file line number Diff line number Diff line change
@@ -150,8 +150,7 @@ implement ``__deconstruct__()`` and should consider redefining ``__match_args__`
* ``__deconstruct__()``: should return a sequence which contains the parts of the deconstructed object.

.. note::
``__match_args__`` will be automatically generated for dataclasses, as specified in PEP 634.
``__match_args__`` and ``__deconstruct__`` will be automatically generated for named tuples.
``__match_args__`` will be automatically generated for dataclasses and named tuples, as specified in PEP 634.

The pattern matching implementation is *not* required to check that ``__match_args__`` and ``__deconstruct__`` behave as specified.
If the value of ``__match_args__`` or the result of ``__deconstruct__()`` is not as specified, then

0 comments on commit 54a16d6

Please sign in to comment.