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 <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-03-23 23:33:17alan_dusetrecipients: + alan_du, eric.smith
2018-03-23 23:33:17alan_dusetmessageid: <1521847997.9.0.467229070634.issue33129@psf.upfronthosting.co.za>
2018-03-23 23:33:17alan_dulinkissue33129 messages
2018-03-23 23:33:17alan_ducreate