Brandt Bucher <brandtbuc...@gmail.com> added the comment:

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?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to