I was working on something when I felt the need to use some structural pattern matching features in 3.10. I’ve used the feature before but not for something production level. Anyways, I felt the need to write something similar to this:
def checker(word:tuple[str,...]) -> None:
match word:
hashed = hash_func(word)
case "pwd-",*body:
#perform some operation using hashed and word
process(word,hashed)
case _:
pass
but a syntax error was raised. It’s not something so big and I’m sure it’s avoidable, but I just thought it’d be more of a convenience if there were some bit of code you could run in the match block before running the cases.