dry-python / dry-python/returns

Question: Tuple returns as arguments

オープン
#730 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
4.4k
フォーク
155
平均マージ
2時間 27分
マージ済み PR(30日)
22

説明

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

```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。