coro_iter() returns a generator which implements the await protocol.
This allows it to be returned from an object.__await__() method, but this method must return an iterator and not
a coroutine.
This makes it simpler to make objects awaitable by allowing coroutines to feed the __await__() method.
coro_iter()
returns a generator which implements theawait
protocol. This allows it to be returned from anobject.__await__()
method, but this method must return an iterator and not a coroutine.This makes it simpler to make objects awaitable by allowing coroutines to feed the
__await__()
method.