Iteration Utilities
Module: ppc_robot_lib.utils.iter
- class ChunkedIterator(iterable, chunk_size, include_empty=True)[source]
Iterator that lazily splits passed iterator into smaller chunks with size specified in
chunk_size
arg and providing some statistics.- Parameters:
include_empty – if true then iterator always yields at least one chunk.
- chunked
alias of
ChunkedIterator
- counted
alias of
_Count
- merged_generator(*generators)[source]
Merges multiple generators into one. Variation of
itertools.chain
, but for generators.