[New-bugs-announce] [issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

Adrian Freund report at bugs.python.org
Wed Apr 7 06:40:27 EDT 2021


New submission from Adrian Freund <git at freundtech.com>:

PEP 634 structural pattern matching adds an auto-generated __match_args__ attribute to classes with the dataclass decorator and to namedtuples.

This change is currently not documented in the dataclass and namedtuple documentation, nor is it mentioned in PEP 557 Data Classes.


I would suggest adding mentions of this behaviour in those three places.

Additionally I think adding a new parameter to switch off generating __match_args__ to dataclass should be considered, as everything else generated by dataclass can be switched off using a parameter.

----------
assignee: docs at python
components: Documentation
messages: 390413
nosy: brandtbucher, docs at python, freundTech, gvanrossum
priority: normal
severity: normal
status: open
title: Documenting dataclass and namedtuple changes for structural pattern matching
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43761>
_______________________________________


More information about the New-bugs-announce mailing list