dry-python / dry-python/returns

Question: Tuple returns as arguments

Open
#730 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.4k
Forks
155
Avg merge
2h 27m
Merged PRs (30d)
22

Description

How would you do something like the following, ie unpack tuple as arguments for next function within flow

```
@safe
def method_b(arg_a: str, arg_b: int) -> int:
return len(arg_a) + arg_b

@safe
def method_a() -> Tuple[str, int]:
return ("abc", 3)

a = flow(
method_a(),
bind(method_b)
)

a.unwrap()
>> 6

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.