enums for pythonz
Project description
pythonz_enum
implementation of rust-like value holding enums
example
from pythonz_enum import Maybe
def find(predicate, iter_):
try:
return Maybe.Just(next(filter(predicate, iter_)))
except StopIteration:
return Maybe.Nothing()
find(lambda a: a is not None, [None, 2, 3]) # Maybe.Just(2)
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
pythonz_enum-0.1.0.tar.gz
(1.6 kB
view details)
Built Distribution
File details
Details for the file pythonz_enum-0.1.0.tar.gz
.
File metadata
- Download URL: pythonz_enum-0.1.0.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.18.1 CPython/3.12.5 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a42dda26a66dfa7e5b51b91d83726c46ec8426d8e29c9073a9252913a8b0ca |
|
MD5 | fb742ecdc357273f14c2c05e811a0ebe |
|
BLAKE2b-256 | 8ef211ac110ec215fac819e8e690ba38425ea38fff8750cbe30046434f104548 |
File details
Details for the file pythonz_enum-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pythonz_enum-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.18.1 CPython/3.12.5 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92d607baa4e0463050f644da9fab3c639db44ab23f43b947425d76abc5171d5 |
|
MD5 | 5b0a01e12f76182bf02d54431dca6f16 |
|
BLAKE2b-256 | c37b6fd738371ef0c1af2f9d636a133fb2e1d18c5c797cadc4ed4b428138858d |