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 <>
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:20bar.harelsetrecipients: + bar.harel, eric.smith, docs@python
2022-03-06 21:51:20bar.harelsetmessageid: <>
2022-03-06 21:51:20bar.harellinkissue46938 messages
2022-03-06 21:51:20bar.harelcreate