Message414627
Actually I'm not sure if the fix is so simple. What happens if B does not inherit from dataclass, but still inherits from A? Do we want to use the new __post_init__? I would assume we do, meaning we don't necessarily want to attach the __post_init__ to the dataclass, but to subclasses.
If so, the suggestion to call __init__() from __post_init__() might be the problematic part, and is what conceptually breaks the inheritance linearization. |
|
Date |
User |
Action |
Args |
2022-03-06 21:51:20 | bar.harel | set | recipients:
+ bar.harel, eric.smith, docs@python |
2022-03-06 21:51:20 | bar.harel | set | messageid: <1646603480.93.0.244021382873.issue46938@roundup.psfhosted.org> |
2022-03-06 21:51:20 | bar.harel | link | issue46938 messages |
2022-03-06 21:51:20 | bar.harel | create | |
|