dry-python / dry-python/returns

Question: Tuple returns as arguments

Đang mở
#730 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4.4k
Fork
155
Merge trung bình
2 giờ 27 phút
Pull request đã merge (30 ngày)
22

Mô tả

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

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.