Comment by Spivak
Also this is pretty much in line for the rest of Python leaving variables around.
for x in [1]:
pass
print(x) # => 1
The match statement presented is equivalent to an assignment, you do have to know that, but then it's just regular Python.
Being in line with the bad original design decision is another bad design decision, python developers should have a courage to admit these instances to benefit from better decisions in new peps. They didn't do it with pattern matching and now the language has another inferior implementation of a feature that, if implemented correctly, should have had clear block scopes, defined as expressions (as opposed to statements), and disallowed type-diverging branches. Java has designed it right, by the way, despite having a differently behaving switch statement in the language already.