From 54a16d60efb1caed1d5bcbb5bacc3abc16f312dc Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 16 Mar 2021 11:15:21 +0000 Subject: [PATCH] Don't special case named tuples. The default behavior is fine. (#1874) --- pep-0653.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pep-0653.rst b/pep-0653.rst index ca65b24344a..c6342c7ef17 100644 --- a/pep-0653.rst +++ b/pep-0653.rst @@ -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