This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author freundTech
Recipients brandtbucher, eric.smith, freundTech, gvanrossum
Date 2021-04-09.22:55:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618008952.56.0.1536142158.issue43764@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2021-04-09 22:55:52freundTechsetrecipients: + freundTech, gvanrossum, eric.smith, brandtbucher
2021-04-09 22:55:52freundTechsetmessageid: <1618008952.56.0.1536142158.issue43764@roundup.psfhosted.org>
2021-04-09 22:55:52freundTechlinkissue43764 messages
2021-04-09 22:55:52freundTechcreate