dry-python / dry-python/returns

Think about lazy loop method

Abierto
#647 4 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement help wanted
Lenguaje dominante
Python
Estrellas
4.4k
Forks
155
Merge medio
2 h 27 min
PR fusionados (30 d)
22

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.