dry-python / dry-python/returns

Think about lazy loop method

Đang mở
#647 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement help wanted
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ả

Imagine that you have a list of 3 elements. And you are going to use `Fold.loop` on it.
The first one is `Failure(1)`.

Currently, `loop` will iterate over all 3 elements. With no breakpoints.
But, `Failure(1)` is a roadblock for any other logic. We should not iterate over other values.

We need to think about best solutions here.
Criteria:

- It should ideally work with any `FailableN`
- It should be similar to `loop` in semantics
- It should be possible to use `loop` or `loop_lazily` on the same functions / helpers. In other words, it should be easy to switch from one to another
- It should be faster than `loop`

Ideas?

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.