A simple Package to replace the akward built-in ternary operator with a function call.
Project description
beautiful-ternary
A simple Python Package to replace the akward built-in ternary operator with a function call. Simple.
Usage
pip install beautiful-ternary
from ternary import tif
tif(condition, return-if-true, return-if-false)
Dependencies
build, twine, pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file beautiful-ternary-1.0.0.tar.gz
.
File metadata
- Download URL: beautiful-ternary-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c42332b58dd645f04a0548e33b9fb65209c419c48a921e523a5c1ae4bc52119 |
|
MD5 | a3236a87ff9b3594af4427e5c727a833 |
|
BLAKE2b-256 | d052cd9c919af6d718c0a8ff9cb132e9a6ffecc9bd329d6fe5b28abe9c5eb816 |
File details
Details for the file beautiful_ternary-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: beautiful_ternary-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a49e0c67f5ccbf342ed5ef7184445658ce5f1e8f3b39e9f67821437ef91740a7 |
|
MD5 | 47917ee77adc63a3cdf3c14b2d71fb0f |
|
BLAKE2b-256 | 67ab9bb0fa551d101d92f242e9f2e3aab1489998966314b664d369de24e477de |