lack of local scope, specifically, seems tied to Python's general lack of scoping beyond function contexts. Which is definitely a footgun for people coming from languages with full block scoping (which I strongly prefer), but at the same time I can see an argument for it making a lot of sense to most beginners to programming, who "look upward", see a name, and wonder why they don't have access to that name.
I agree about the unintuitive binding of names, though presumably the rationale is simply that any other approach would have introduced a significant amount of boilerplate. The only syntax I can think of would require a "bare as", e.g.:
FOUR_HUNDRED = 400
NOT_FOUND = 404
match code_and_val:
case (FOUR_HUNDRED, as x):
print(x) # FOUR_HUNDRED is not bound at all, but simply matched
case (NOT_FOUND as x, as y):
print(x, y) # prints 404, code_and_val[1]
which looks quite weird to a Python programmer, though in this case I suppose you could argue that explicit is better than implicit.not sure why the `|` overloading is a big deal here? there's no other significantly useful meaning for it in this context. Can you be more specific?