Repository navigation
v0.1.0
Initial public release of switchlang on PyPI: an explicit switch block for Python built on the with statement.
Added
switch(value)context manager withcase()anddefault()registration; cases run on block exit.- Duplicate-case detection (
ValueError) and validation that case actions are callable. - List and
rangekeys so one action can serve several values; empty collections are rejected (#8). - Opt-in fall-through per case via
fallthrough=True. switch.resultto read the matched case's return value after the block.closed_range(start, stop)helper, inclusive on both ends.- Packaged as
switchlangwith asetup.pyfor installation from PyPI (#5, #11).
Published to PyPI on 2020-03-20 (https://pypi.org/project/switchlang/0.1.0/). This GitHub release was created retroactively on 2026-11-07 so every PyPI release has a matching tag and release; the tag points at the exact commit the PyPI sdist was built from.