4 ms·
I would say it's not a smart switch statement, since you can bind variables. match shape: case Point(x, y): ... case Rectangle(x, y, _, _):
by Tyr42 6y ago
I would say it's not a smart switch statement, since you can bind variables.
match shape:
case Point(x, y):
...
case Rectangle(x, y, _, _):
...
print(x, y) # This works