py_anext(
iterator: AsyncIterator[T],
default: T | Any = _no_default| Name | Type | Description |
|---|---|---|
iterator* | AsyncIterator[T] | |
default | T | Any | Default: _no_default |
Pure-Python implementation of anext() for testing purposes.
Closely matches the builtin anext() C implementation.
Can be used to compare the built-in implementation of the inner coroutines machinery
to C-implementation of __anext__() and send() or throw() on the returned
generator.
The async iterator to advance.
The value to return if the iterator is exhausted.
If not provided, a StopAsyncIteration exception is raised.