3 ms·
match is a statement, but the syntax is very readable. https://www.python.org/dev/peps/pep-0636/#adding-conditions-to-patterns https://www.python.org/dev/peps/
by galkk 6y ago
match is a statement, but the syntax is very readable.
https://www.python.org/dev/peps/pep-0636/#adding-conditions-to-patterns https://www.python.org/dev/peps/pep-0636/#adding-conditions-...
- chriswarbo 6y ago> the syntax is very readable Yet it can't be used in a lambda, it can't be assigned to a variable, it can't be used as an argument, it can't be called as a function, it can't be put in a datastructure, it can't be raised, it can't be returned, it can't be yielded, and so on for all the things that can't be done to statements. Heck, we can't even match on a match!