Message392058
Motivating example:
>>> @dataclass
... class A:
... x: InitVar[int] = 0
... y: int = 1
...
>>> a = A()
>>> a.x
0
>>> a.y
1
PEP-557 does not specify if fields annotated with InitVar[...] are available on the resulting dataclass. However, they are not part of the dataclass structure and are only used for __*init__ generation, so perhaps they shouldn't be? Wdyt? |
|
Date |
User |
Action |
Args |
2021-04-27 11:54:00 | superbobry | set | recipients:
+ superbobry, eric.smith |
2021-04-27 11:54:00 | superbobry | set | messageid: <1619524440.38.0.385093329161.issue43953@roundup.psfhosted.org> |
2021-04-27 11:54:00 | superbobry | link | issue43953 messages |
2021-04-27 11:54:00 | superbobry | create | |
|