pychoice
An utility adds code readability to your application and/or API, Code is documentation!
Install
pip install pychoice
Example
from pychoice import Choice
Status = Choice(
(0, 'item0'),
(1, 'item1'),
(2, 'item2')
)
assert Status('item0') == 0
assert Status('item0', 'item1') == [0, 1]
assert Status[0] == 'item0'
assert Status[0, 1] == ['item0', 'item1']
assert Status[...] == ['item0', 'item1', 'item2']
assert Status.exclude('item0') == [1, 2]
assert Status.pairs('item0', 'item2') == [(0, 'item0'), (2, 'item2')]
Release files for pychoice 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pychoice-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / pychoice-0.1.1-py2.py3-none-any.whl
| Download URL | pychoice-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d597dd02310fa28520b2978f9f30dff416e08ed712d768231e49724bcf6f6b98
|
|
BLAKE2b-256 checksum How to use checksums |
8f2ad92566bc7288ff919c455c9f3cc1c99894fa48ba8a6cb96dff2619ecccbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |