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.2.1.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file pythonz_enum-0.2.1.tar.gz
.
File metadata
- Download URL: pythonz_enum-0.2.1.tar.gz
- Upload date:
- Size: 2.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 | 508d0a2821af61f78045b5e5433ca3714a9cbaaef636d0edb8e1faca40147cc7 |
|
MD5 | 9985579788c4cea83c2a3937b7690a9b |
|
BLAKE2b-256 | ee65c5a1e901fb19b15dd97b3c8e1077f94b17028b42265bfd3cb744dcfafdbc |
File details
Details for the file pythonz_enum-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pythonz_enum-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.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 | 16d867d5b37c5c692b6fb304bed2361a0921bc89743fd6ba48717b8ecb851aea |
|
MD5 | 36034b1f1b84029c84141041d4be6318 |
|
BLAKE2b-256 | fc5b79d81a46c2eeef6c7280ab5f8bc661b8c106484f217d3cab117c15580f46 |