Collection Interface ABCs
collections.abc.AsyncIterator
Asynchronous iterables implementing __anext__, which returns an awaitable for each next item.
Formal Syntax & Structure
python syntaxpython
collections.abc.AsyncIteratorReturn Value
type
Abstract base class object representing the described interface; use it for recognition or inheritance.
Working Example
Example Snippetpython
import collections.abcasync def f(): yield 1g=f()import asynciotry: result=isinstance(g,collections.abc.AsyncIterator)finally: asyncio.run(g.aclose())print(result)