[$] "Structural pattern matching" for Python, part 1

We last looked at the idea of a Python
“match” or “switch” statement back in 2016, but it is something that has
been circulating in the Python community both before and since that coverage.
In June it was raised again, with a Python Enhancement Proposal (PEP)
supporting it: PEP 622
(“Structural Pattern Matching“). As that title would imply, the
match statement proposed in the PEP is actually a pattern-matching
construct with many uses.
While it may superficially resemble the C switch statement, a
Python match would do far more than simply choose a chunk of code
to execute based on the value of an expression.

Source: LWN.net – [$] “Structural pattern matching” for Python, part 1