The real purpose of Pythons match statement, feat. CSTs
What s the purpose of the match statement in Python The match statement is commonly mistaken for being Python s way of adding a switchcase statement. NOPE This is not the intended purpose of the match statement, and it does not have similar performance benefits. Let s see what the match statement is REALLY for by parsing concrete syntax trees (CSTs). mCoding with James Murphy Source code: libcst: AST linting vid: Structural pattern matching vid:
|
|