aioplus.asum

async aioplus.asum(aiterable, /, *, start=0)

Sum start and items of aiterable from left to right and return the total.

Parameters:
  • aiterable (AsyncIterable[T]) – An asynchronous iterable.

  • start (T) – The initial value to start the summation from.

Returns:

The total sum of the items in the asynchronous iterable.

Return type:

T

Examples

>>> aiterable = arange(23)
>>> await asum(aiterable)
253

See also

sum()