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 brandtbucher
Recipients ahmetveburak, brandtbucher, docs@python
Date 2021-05-13.21:21:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620940904.47.0.667096703.issue44109@roundup.psfhosted.org>
In-reply-to
Content
I don't really think there is anything wrong with the documentation. I can copy-and-paste all of the code from the PEP 634 section of the 3.10 What's New into the REPL without any issues (provided that named subjects like point/points/test_variable/color are actually defined).

Note that none of the example snippets actually *create* Point instances. Rather, some of the patterns *match* Point instances... which is sort of the opposite of instantiation.

As the Point class is currently written, instantiation would probably look like:

>>> p = Point()
>>> p.x = 0
>>> p.y = 0

Sure, it would help to have an __init__ defined in real code, but I sort of feel like adding it to this example would just distract (especially since the example doesn't actually *need* it).

Thoughts from others?
History
Date User Action Args
2021-05-13 21:21:44brandtbuchersetrecipients: + brandtbucher, docs@python, ahmetveburak
2021-05-13 21:21:44brandtbuchersetmessageid: <1620940904.47.0.667096703.issue44109@roundup.psfhosted.org>
2021-05-13 21:21:44brandtbucherlinkissue44109 messages
2021-05-13 21:21:44brandtbuchercreate