# API 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](switch.md#switchlang.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()](closed_range.md#switchlang.closed_range) Create a closed range for a case: both `start` and `stop` are included.