This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bar.harel
Recipients bar.harel, docs@python, eric.smith
Date 2022-03-06.21:51:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646603480.93.0.244021382873.issue46938@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-03-06 21:51:20bar.harelsetrecipients: + bar.harel, eric.smith, docs@python
2022-03-06 21:51:20bar.harelsetmessageid: <1646603480.93.0.244021382873.issue46938@roundup.psfhosted.org>
2022-03-06 21:51:20bar.harellinkissue46938 messages
2022-03-06 21:51:20bar.harelcreate