dss-extensions / dss-extensions/AltDSS-Python

Batches from Python generator objects

Abierto
#13 1 comentario 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
19
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Generating batches from Python generator objects would allow users to use complex and custom filtering in Python to create a high-performance batch object as a result.

This couples well with the new `iterate()` method, which reuses Python-side objects. This currently doesn't work without the copy:

```
from copy import copy
# Python generator object
selected_load_objs = (copy(load) for load in altdss.Load.iterate() if predicate_function(load))
selected_load_batch = altdss.Load.batch(objs=selected_load_objs)
```

The idea is to allow using the temporary iterator objects directly, since they are lightweight.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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.