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 andrei.avk
Recipients ahmetveburak, andrei.avk, brandtbucher, docs@python, eric.smith, rhettinger
Date 2021-06-25.21:00:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624654802.85.0.300939371562.issue44109@roundup.psfhosted.org>
In-reply-to
Content
I agree the example is confusing for all of the stated reasons.

It seems to me it's better to use a plain class with a `__init__()` for two reason:

- for people who are not familiar with namedtuples or dataclasses, it would be harder to learn two fairly complex topics at the same time. Docs for both are fairly extensive.

- for those who *are* familiar with namedtuples or dataclasses (whichever is used in the example), the example may imply they should be used with pattern matching, and that plain classes may not work or not work well.

I can make a PR that adds `__init__` if this makes sense..
History
Date User Action Args
2021-06-25 21:00:02andrei.avksetrecipients: + andrei.avk, rhettinger, eric.smith, docs@python, brandtbucher, ahmetveburak
2021-06-25 21:00:02andrei.avksetmessageid: <1624654802.85.0.300939371562.issue44109@roundup.psfhosted.org>
2021-06-25 21:00:02andrei.avklinkissue44109 messages
2021-06-25 21:00:02andrei.avkcreate