[issue43764] Turning off generation of __match_args__ for dataclasses

Eric V. Smith report at bugs.python.org
Sat Apr 10 15:17:45 EDT 2021


Eric V. Smith <eric at trueblade.com> added the comment:

> So, should we reopen this ad add the flag to suppress __match_args__ generation after all?

I think so, although I'm still contemplating it.

I can't decide if we should also add match_arg=False to field(). Or is it good enough to just tell the user to manually set __match_args__ if they want that level of control? I think this is different enough from repr, init, etc. that we don't need to allow the per-field control, although maybe doing so would make the code more robust in terms of re-ordering or adding fields at a later date.

----------

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


More information about the Python-bugs-list mailing list