Message383131
For the API, I think we could add this feature with a single new `dataclass(kw_only: bool | str)`
```
@dataclasses.dataclass(kw_only=True)
class A:
a: int
b: int
c: int
# A(*, a, b, c)
@dataclasses.dataclass(kw_only='b')
class A:
a: int
b: int
c: int
# A(a, *, b, c)
```
I think this would be flexible enough for all use cases, while avoiding the boilerplate from the above proposals. |
|
Date |
User |
Action |
Args |
2020-12-16 09:49:49 | conchylicultor | set | recipients:
+ conchylicultor, rhettinger, eric.smith, pmpp, ryanhiebert, alan_du, xtreak, jimbo1qaz_, wyz23x2, wanderrful, Prakhar Goel |
2020-12-16 09:49:49 | conchylicultor | set | messageid: <1608112189.03.0.93082886816.issue33129@roundup.psfhosted.org> |
2020-12-16 09:49:49 | conchylicultor | link | issue33129 messages |
2020-12-16 09:49:48 | conchylicultor | create | |
|