Message396640
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.") |
|
Date |
User |
Action |
Args |
2021-06-28 14:24:52 | serif2 | set | recipients:
+ serif2, docs@python |
2021-06-28 14:24:51 | serif2 | set | messageid: <1624890291.98.0.24550553964.issue44526@roundup.psfhosted.org> |
2021-06-28 14:24:51 | serif2 | link | issue44526 messages |
2021-06-28 14:24:51 | serif2 | create | |
|