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.0.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file pythonz_enum-0.2.0.tar.gz
.
File metadata
- Download URL: pythonz_enum-0.2.0.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 | 3564da1779fa7dc109d78f7b3056ba81938bcc89605ac434b2fa70013e7dabe1 |
|
MD5 | 42196e3bb71e680191c5f79bff6bbdc9 |
|
BLAKE2b-256 | 2c899aad2544a0a17cb4488be270744d46a93c754e1efff59bba549b3886279c |
File details
Details for the file pythonz_enum-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pythonz_enum-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.5 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 | 74d2a17bb2495a6a57580e4f95e3fccebb9326b833e0a58e2b1466bb0e085dac |
|
MD5 | a185ed52ac2677500c596c328fc8b32b |
|
BLAKE2b-256 | 0d1e778202c89befbf29ae1b2dc56a934f4013ec0cfb4f204a1066bd5a152e64 |