returns icon indicating copy to clipboard operation
returns copied to clipboard

Make your functions return something meaningful, typed, and safe!

Results 108 returns issues
Sort by recently updated
recently updated
newest added

We have several quite large examples that live in our docs: 1. https://github.com/dry-python/returns/blob/master/docs/pages/future.rst#futureresult 2. `Number` example from: https://github.com/dry-python/returns/blob/master/docs/pages/contrib/hypothesis_plugins.rst#check_all_laws 3. https://github.com/dry-python/returns/blob/master/docs/pages/context.rst#requirescontextfutureresult-container What needs to be done? - We need to extract...

enhancement
help wanted
good first issue
documentation
hacktoberfest

After think a lot about #355 it will be great to provide the same mechanisms we have to "normal" functions to generators! It is not uncommon to see generators in...

enhancement
help wanted

After #244 we now have `.from_iterable` constructor on every container. We should also add `to_iterable(container: Container[Sequence[T]]) -> Iterable[Container[T]]:` (where `Container` is just an alias, we should support types for all...

enhancement
help wanted

We can add `Lazy = () => A` protocol to `returns.primitives.types` This might be helpful when working with `IO` when someone want to slow things down. One should use `Protocol`...

enhancement
help wanted
good first issue
hacktoberfest

For example, `.map` is just `return self.__class__(function(self._inner_value))` in many cases. There are also other methods that can be possibly have defaults. Or `.from_iterable` also is the same for every container....

enhancement

It is similar to `Result`, but also has the third case: when we have both `Success` and `Failure`. Link: https://github.com/gcanti/fp-ts/blob/master/src/These.ts

enhancement

We need this to wrap regular values into a monad. This might be required when you have a function like this: ```python @kinded def do_something(c: KindN[V, E, D], f: Callable[[V],...

enhancement

- [ ] Describe our decision - [ ] Add a link to: https://github.com/jmesyou/functional-programming-jargon.py - [ ] Improve https://github.com/jmesyou/functional-programming-jargon.py with `returns` links and examples

enhancement
documentation

This can be released as an independent library: https://github.com/ReactiveX/RxPY

enhancement
dependencies

Currently, they do return incorrect types: ```python reveal_type(IOResultE.from_value(int)) # => IOResult[int, Any] # Should be: # => IOResult[int, Exception] ``` To achieve what we want we might tweak the way...

bug
help wanted