On this page
  1. typing.Coroutine
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

typing.Coroutine

Prev: typing.ContextManager | Up: typing | Next: typing.Counter
Rel: typing.AbstractSet, typing.Annotated, typing.Any, typing.assert_never
Ref: docs.python.org — typing.Coroutine
Tags: #public #python3 #stdlib #typing


Import

import typing
from typing import Coroutine

Signature & Overview

typing.Coroutine(*args, **kwargs)

Deprecated alias to collections.abc.Coroutine.

Usage

from typing import Coroutine

# Type parameters are [YieldType, SendType, ReturnType]
assert Coroutine[None, None, int] is not None

Gotchas

REPL Inspect

from typing import Coroutine
help(Coroutine)

Linked from

Related notes