dss-extensions / dss-extensions/AltDSS-Python

Batches from Python generator objects

オープン
#13 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。