Reference
The switch block
The context manager that gives Python an explicit switch statement. Use it in a with block, register cases, then read result.
- switch
-
An explicit switch statement for Python, implemented as a context manager.
Range helpers
Helpers for mapping ranges of values to a single case.
- closed_range()
-
Create a closed range for a case: both
startandstopare included.