Switch And Case Tool
Project description
SwitchTools - Library for switch-case on python
Using Switch And Case
import switchtools
Switch("Value",[
Case("CaseValue",lambda:print("test"))
])
Using Switch And Case with lambda args
import switchtools
Switch("Value",[
Case("CaseValue",lambda x:print(f"test {x}"),[10])
])
Using Switch And Case with default
import switchtools
Switch("Value",[
Case("CaseValue",lambda x:print(f"test {x}"),[10]),
Case("default",lambda:print(f"default"))
])
And Switch And Case can working with class
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
switchtools-1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for switchtools-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbf34551a85c7694600cac8666fe7c5644e79c89ef7aef1350b23875258f908 |
|
MD5 | e6d5821755ff1689ccd62d76ed61107f |
|
BLAKE2b-256 | de82b373560f106b08c1b8965a7e54e44ad4d0c93b1e8cebffbfe00c83989317 |