"Structural pattern matching" for Python, part 2
"Structural pattern matching" for Python, part 2
Posted Sep 9, 2020 13:37 UTC (Wed) by milesrout (guest, #126894)In reply to: "Structural pattern matching" for Python, part 2 by kleptog
Parent article: "Structural pattern matching" for Python, part 2
At that point, how is this better than
(x, y) = size
if x == y:
circle()
else:
ellipse()
I would contend that it is not. It is an extra level of indentation and a whole new complicated language construct.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
