Collection Interface ABCs

collections.abc.Coroutine

Awaitable objects with send, throw and close operations, such as native coroutine objects.

Formal Syntax & Structure

python syntaxpython
collections.abc.Coroutine

Return 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(): return 1c=f()try: result=isinstance(c,collections.abc.Coroutine)finally: c.close()print(result)
Python Reference