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 serif2
Recipients docs@python, serif2
Date 2021-06-28.14:24:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624890291.98.0.24550553964.issue44526@roundup.psfhosted.org>
In-reply-to
Content
Page:

What’s New In Python 3.10
https://docs.python.org/3.10/whatsnew/3.10.html

Section:

PEP 634: Structural Pattern Matching
    Patterns and classes

In the example code, x and y in the printed messages are swapped.

        case Point(x=0, y=y):
            print(f"Y={y} and the point is on the y-axis.")
        case Point(x=x, y=0):
            print(f"X={x} and the point is on the x-axis.")

Should be:

        case Point(x=0, y=y):
            print(f"Y={y} and the point is on the x-axis.")
        case Point(x=x, y=0):
            print(f"X={x} and the point is on the y-axis.")
History
Date User Action Args
2021-06-28 14:24:52serif2setrecipients: + serif2, docs@python
2021-06-28 14:24:51serif2setmessageid: <1624890291.98.0.24550553964.issue44526@roundup.psfhosted.org>
2021-06-28 14:24:51serif2linkissue44526 messages
2021-06-28 14:24:51serif2create