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 hashes)