[issue33129] Add kwarg-only option to dataclass

2018-03-25 Thread Alan Du
Change by Alan Du : -- keywords: +patch pull_requests: +5975 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33129> ___ ___ Python-

[issue33129] Add kwarg-only option to dataclass

2018-03-23 Thread Alan Du
Alan Du added the comment: Err... the right link would actually be https://github.com/alanhdu/cpython/tree/bpo-33129. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33129] Add kwarg-only option to dataclass

2018-03-23 Thread Alan Du
Alan Du added the comment: If this would be accepted, I'd be happy to contribute a patch adding a `kwarg_only` option to `dataclass` (although it might take me a while since I'm not super familiar with the Python development workflow). I believe I already have the code change ne

[issue33129] Add kwarg-only option to dataclass

2018-03-23 Thread Alan Du
New submission from Alan Du : 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