chainlet.primitives.bundle module

class chainlet.primitives.bundle.Bundle(elements)

Bases: chainlet.primitives.compound.CompoundLink

A group of chainlets that concurrently process each data chunk

chain_fork = True
chain_join

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

chainlet_send(value=None)

Send a value to this element for processing

chainlet.primitives.bundle.bundle_sequences(element)

Convert sequence types to bundles

This converter automatically constructs a Bundle from any tuple, list or set encountered during linking. The following two lines produce the same chain:

a >> [b, c, d] >> e
a >> Bundle((b, c, d)) >> e