indicative.collection#

Classes#

Collection

A collection of functions that can be called in parallel.

Module Contents#

class indicative.collection.Collection[source]#

A collection of functions that can be called in parallel.

fns[source]#

A tuple of callables.

Returns:

A list of results from calling each function in fns with the same arguments.

fns: tuple[collections.abc.Callable[[Any], Any], Ellipsis][source]#
__call__(*args, **kwargs)[source]#

Calls each function in fns with the same arguments.

Parameters:
  • *args – The positional arguments to pass to each function.

  • **kwargs – The keyword arguments to pass to each function.

Returns:

A list of results from calling each function in fns.

__ror__(other)[source]#

Allows using the | operator for calling the functions in fns.

Parameters:

other (Any) – The argument to pass to each function.

Returns:

The result of calling each function in fns with other.

Return type:

Any