Adrian Freund <g...@freundtech.com> added the comment:
> I assume the OP wants to have a class that doesn't allow positional patterns. > The right way to spell that is indeed to add > > __match_args__ = () > >to the class, there's no need to add another flag to @dataclass. The same however is also true for all the other stuff generated by @dataclass. You can for example disable generation of the init method using def __init__(self): pass and dataclass still has a parameter to disable it. I agree that a new parameter isn't strictly required to achieve functionality, however I would still argue that it should be added for consistency with the rest of the dataclass api. ---------- _______________________________________ 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