New submission from Adrian Freund <g...@freundtech.com>:

The dataclass decorator can take multiple parameters to enable or disable the 
generation of certain methods.

PEP 634 Structural Pattern Matching extends dataclasses to also generate a 
__match_args__ attribute.

I think adding a parameter to enable and disable generation of __match_args__ 
should be to dataclass should also be considered for consistency.

Note that setting compare=False on a dataclass.field already excludes that 
field from __match_args__, but there is no way to disable generation of 
__match_args__ completely.

----------
components: Library (Lib)
messages: 390429
nosy: brandtbucher, eric.smith, freundTech, gvanrossum
priority: normal
severity: normal
status: open
title: Turning off generation of __match_args__ for dataclasses
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43764>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to