[New-bugs-announce] [issue43558] The dataclasses documentation should mention how to call super().__init__

Eric V. Smith report at bugs.python.org
Fri Mar 19 10:47:18 EDT 2021


New submission from Eric V. Smith <eric at trueblade.com>:

https://docs.python.org/3/library/dataclasses.html#post-init-processing should mention that if you need to call super().__init__, you should do it in __post_init__. Dataclasses cannot know what parameters to pass to the super class's __init__, so you'll need to do it yourself manually in __post_init__.

----------
assignee: eric.smith
components: Documentation
messages: 389097
nosy: eric.smith
priority: low
severity: normal
stage: needs patch
status: open
title: The dataclasses documentation should mention how to call super().__init__
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43558>
_______________________________________


More information about the New-bugs-announce mailing list