Skip to main content

Rust-like Option and Result implementation

Project description

Python Option and Result

 _______  _______  __   __  __    _  _______  __    _
|       ||       ||  |_|  ||  |  | ||       ||  |  | |
|  _____||   _   ||       ||   |_| ||   _||   |_| |
| |_____ |  | |  ||       ||       ||  | |  ||       |
|_____  ||  |_|  ||       ||_    ||  |_|  ||  _    |
 _____| ||       || ||_|| || | |   ||       || | |   |
|_______||_______||_|   |_||_|  |__||_______||_|  |__|

Quick and dirty Rust like Option and Result implementation.

Influence from Rust std::option and std::result

Reference

This package implements many of the Rust Option and Result monad features. Some names have been altered slightly to prevent clashes with reserved keywords and clashes with builtins.

https://doc.rust-lang.org/std/result/

https://doc.rust-lang.org/std/option/

Installation

pip install somnon

Usage

Examples in progress. In the time being read through the above rust-docs, they mostly cover everything anyway.

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

somnon-0.1.5.tar.gz (40.2 kB view hashes)

Uploaded Source

Built Distribution

somnon-0.1.5-py3-none-any.whl (28.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page