result
result copied to clipboard
A simple Rust like Result type for Python 3. Fully type annotated.
Using async decorator uses type hints incompatable with with `asyncio.run` or `asyncio.create_task`
It would be nice to be able to use this with asyncio methods like `run` and `create_task` without needing to resort to escape hatches like `typing.cast` or `#type: ignore`. I'm...
https://devguide.python.org/versions/ Scheduled to be released 2024-10-01
End of life 2024-10. **Do no remove before then** https://devguide.python.org/versions/
#121 deprecated the `.value` method. This method needs to be removed in a future version. Ideally we'd wait a while so users can have enough time to migrate away on...
https://github.com/rustedpy/result/pull/140 has some good proposed changes. It was autoclosed because `master` branch was deleted when we switched to `main` branch.
What do u guys think about adding some helpers functions like flow & bind, just like `returns` already has? I try to use them and imho its looks better then...
add overload to unwrap_or_raise to raise the exception itself ```python n2 = Err(ValueError('nay')) with pytest.raises(ValueError) as exc_info: n2.unwrap_or_raise() ```
Hello, i'm doing some refactoring of my app, and wanted to use `result`. Old code uses `if some_func(): ...` constructions, and now they're returning Result(), and this should not be...
The following type checks (pyright, all checks enabled): ``` T_cov = TypeVar("T_cov", covariant=True) StrResult = Result[T_cov, str] ExceptionResult = Result[T_cov, Exception] def foo() -> StrResult[int]: return Ok(1) def baz(x: int)...
Hello! I'm seeking an alternative solution for a specific use case involving async generators. Our work heavily relies on async generators, and I needed a way to decorate an async...