Re:Statically-typed error handling in Python using Mypy
by mplanchard on Sunday December 08, 2019 @10:04PM
(#21740093)
I’ve written a similar python library called `safetywrap` that implements both Result and Option types from rust, with almost all of the interfaces implemented, including unwrap, map, flat map, err_map, etc. It fully supports types and works well with mypy.
Feel free to give it a shot! https://pypi.org/project/safetywrap/