match — Expert Playground
Begins a structural pattern matching block (3.10+)
Python Playground
Output
Click "Run" to execute your codematch compiles to a decision tree of type checks, comparisons, and conditional jumps. Each pattern type uses different bytecode sequences to test and destructure.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?