as_iterator()
is a generic function that transforms its input to
an iterator function. The default implementation
is as follows:
Methods must return functions that implement coro's iterator protocol.
as_iterator()
is called by coro on the RHS of in
in for
loops. This applies within generators, async functions, and loop()
.