dss-extensions / dss-extensions/AltDSS-Python

Batches from Python generator objects

Đang mở
#13 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
19
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đá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.