New submission from Alan Du <ahd2...@columbia.edu>: 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. ---------- components: Library (Lib) messages: 314341 nosy: alan_du, eric.smith priority: normal severity: normal status: open title: Add kwarg-only option to dataclass type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33129> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com