Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 346 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 346 Bytes

A switch "statement" for Python. Please don't actually use this.

x = 5

switch(x)

if case(4):
    assert False

if case(5):
    assert True
    fallthrough()

if case(lambda x: x > 3):
    assert True

if case(6):
    assert False

if default():
    assert False

Tests and usage in test.py.