New submission from Adrian Freund <g...@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@python
components: Documentation
messages: 390413
nosy: brandtbucher, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue43761>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to