Switch and Case tool
Project description
SwitchTools - Library for switch-case on python
Using Switch And Case
from switchtools.switchcase import Switch,Case
Switch("Value",[
Case("CaseValue",lambda:print("test"))
])
Using Switch And Case with lambda args
from switchtools.switchcase import Switch,Case
Switch("Value",[
Case("CaseValue",lambda x:print(f"test {x}"),[10])
])
Using Switch And Case with default
from switchtools.switchcase import Switch,Case
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.4.tar.gz
(1.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file switchtools-1.4.tar.gz.
File metadata
- Download URL: switchtools-1.4.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a2da62cfbf91b523fccd2c59913c73a3df5a063b8465fa81acee5b9f0f1c8d
|
|
| MD5 |
1ef8e49cbdef4952261261fafe5ea997
|
|
| BLAKE2b-256 |
339c648d7fe67221652668d6d93cfe149ac2b1e1f0280ad9b5335d2678c5f2ad
|
File details
Details for the file switchtools-1.4-py3-none-any.whl.
File metadata
- Download URL: switchtools-1.4-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2f38b928ecd9ca87ecd966876ce7a4e493fbbff94c23acc1fc597e25378f2aa
|
|
| MD5 |
fff774bf68fcd6750f87d7987d15f0e2
|
|
| BLAKE2b-256 |
b0acd389cecf9abbf7ca5cc9b80843480d581023f8e32dadab5a1d46631de42f
|