Return the first n items of aiterable.
n
aiterable
aiterable (AsyncIterable[T]) – Iterable.
n (int) – Limit.
Iterator.
AsyncIterator[T]
Examples
>>> aiterable = arange(23) >>> [num async for num in ahead(aiterable, n=4)] [0, 1, 2, 3]
See also
itertools.islice()
Because asyncio.gather() is not enough!
API Reference