Rust's Option and Result. In Python.

59 points ZygmuntDzwon

Hi!

After coding in Rust for quite a while now, whilst still professionally coding in Python, I thought I'd love to use Option and Result types in Python too.

So here it is, full (up to what makes sense in Python context) port of Rust's Option and Resultin Python. Fully compatible with mypy.

https://github.com/pawelrubin/rustshed

\[EDIT\]: Just to clarify: It's rather an experiment / project for fun than a serious library.