Skip to the content.

Type Hint for Callable

Recipes

Since Python 3.9, typing.Callable is deprecated, using collections.abc.Callable instead. See PEP 585.

from collections.abc import Callable


Callable[[Arg1Type, Arg2Type], ReturnType]
Callable[[...], ReturnType]  # variable arguements

More Details

References