Sumtypes in Python.
Project description
nr.sumtype
Make use of sumtypes in Python.
from nr.sumtype import Constructor, Sumtype
class Status(Sumtype):
Idle = Constructor()
Loading = Constructor(['progress'])
Succeeded = Constructor()
Error = Constructor(['message'])
print(Status.Loading(progress=0.0))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.sumtype-0.0.1.tar.gz
(3.8 kB
view details)
File details
Details for the file nr.sumtype-0.0.1.tar.gz
.
File metadata
- Download URL: nr.sumtype-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb177773864879c779d2d16f9e5e782df7a171c73cc1495c011d8b941ea0f364 |
|
MD5 | daf60b5d28e6886c65063a518af9839f |
|
BLAKE2b-256 | a29751989f60478b35a91ec88041e42554411bb6baaa0113a567b847262e6b23 |