dss-extensions / dss-extensions/AltDSS-Python

Batches from Python generator objects

未关闭
#13 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Python
星标
19
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。