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.

classification
Title: The dataclasses documentation should mention how to call super().__init__
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: JunyiXie, corona10, dhoekstra, eric.smith, miss-islington
Priority: low Keywords: easy, newcomer friendly, patch

Created on 2021-03-19 14:47 by eric.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25967 merged dhoekstra, 2021-05-07 12:22
PR 26018 merged miss-islington, 2021-05-10 13:30
PR 26019 merged miss-islington, 2021-05-10 13:30
Messages (6)
msg389097 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-03-19 14:47
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__.
msg393114 - (view) Author: Douwe Hoekstra (dhoekstra) * Date: 2021-05-06 17:12
I'd like to fix this. Since this would be my first contribution ever, I will need some time to figure out procedures and style requirements regarding documentation. I estimate this will take me no longer than 3 days.
msg393115 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-06 17:29
Sure. Take your time! Thank you in advance for your contribution.
msg393391 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-10 13:38
New changeset 4d532d3f8f7970493442d7c217220f60312f92e1 by Miss Islington (bot) in branch '3.9':
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26019)
https://github.com/python/cpython/commit/4d532d3f8f7970493442d7c217220f60312f92e1
msg393392 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-10 13:38
New changeset f47305aa1fa41c38f744e9a16ae33b74c6fd45e7 by Miss Islington (bot) in branch '3.10':
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26018)
https://github.com/python/cpython/commit/f47305aa1fa41c38f744e9a16ae33b74c6fd45e7
msg393393 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-10 13:39
Thanks, @dhoekstra!
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87724
2021-05-10 13:39:25eric.smithsetstatus: open -> closed
resolution: fixed
messages: + msg393393

stage: patch review -> resolved
2021-05-10 13:38:51eric.smithsetmessages: + msg393392
2021-05-10 13:38:14eric.smithsetmessages: + msg393391
2021-05-10 13:30:45miss-islingtonsetpull_requests: + pull_request24669
2021-05-10 13:30:41miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24668
2021-05-07 12:22:36dhoekstrasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request24623
2021-05-06 17:29:21eric.smithsetmessages: + msg393115
2021-05-06 17:12:43dhoekstrasetnosy: + dhoekstra
messages: + msg393114
2021-05-03 15:55:42eric.smithsetkeywords: + newcomer friendly
2021-05-03 15:51:41eric.smithsetassignee: eric.smith ->
2021-03-23 01:03:26corona10setnosy: + corona10
2021-03-22 20:33:26eric.smithsetkeywords: + easy, - patch
stage: patch review -> needs patch
2021-03-22 20:33:03eric.smithsetpull_requests: - pull_request23731
2021-03-22 20:32:56eric.smithsetpull_requests: - pull_request23730
2021-03-22 14:17:25JunyiXiesetpull_requests: + pull_request23731
2021-03-22 14:05:55JunyiXiesetkeywords: + patch
nosy: + JunyiXie

pull_requests: + pull_request23730
stage: needs patch -> patch review
2021-03-19 14:47:18eric.smithcreate