dipswitch-1.0
توضیحات
Switch statements for Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dipswitch-1.0 |
| نام | dipswitch |
| نسخه کتابخانه | 1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Declan Hoare |
| ایمیل نویسنده | declanhoare@exemail.com.au |
| آدرس صفحه اصلی | https://home.exetel.com.au/declanhoare/projects/dipswitch.git |
| آدرس اینترنتی | https://pypi.org/project/dipswitch/ |
| مجوز | - |
# Dipswitch
Dipswitch is a Python module allowing for switch-case statements with a
similar structure to those in languages that natively support them.
## Usage
```
from dipswitch import switch
for case in switch(2):
if case(0):
print("doesn't execute")
if case(1):
print("doesn't execute")
break
if case(2):
print("executes")
if case(3):
print("executes")
break
if case(4):
print("doesn't execute")
break
if case.default():
print("doesn't execute")
```
نحوه نصب
نصب پکیج whl dipswitch-1.0:
pip install dipswitch-1.0.whl
نصب پکیج tar.gz dipswitch-1.0:
pip install dipswitch-1.0.tar.gz