
Andrei Kulakov <andrei.avk@gmail.com> added the comment: 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.. ---------- nosy: +andrei.avk _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue44109> _______________________________________