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 alan_du
Recipients alan_du, eric.smith
Date 2018-03-23.23:33:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'd like to request a new option to the `dataclasses.dataclass` decorator to make the `__init__` keyword-only.

The two use-cases I have in mind are:

(1) Using as a dataclass big-bag-of-config. In this scenario, forcing the user to specify the keywords is a lot nicer than passing in a dozen positional parameters.

(2) Having kwarg-only parameters means that inheritance and default parameters play nicely with each other again instead of raising a TypeError.
Date User Action Args
2018-03-23 23:33:17alan_dusetrecipients: + alan_du, eric.smith
2018-03-23 23:33:17alan_dusetmessageid: <>
2018-03-23 23:33:17alan_dulinkissue33129 messages
2018-03-23 23:33:17alan_ducreate