diff --git a/pep-0484.txt b/pep-0484.txt index b575f4071..c22047337 100644 --- a/pep-0484.txt +++ b/pep-0484.txt @@ -85,8 +85,8 @@ Non-goals --------- While the proposed typing module will contain some building blocks for -runtime type checking -- in particular a useful ``isinstance()`` -implementation -- third party packages would have to be developed to +runtime type checking -- in particular the `get_type_hints()` +function -- third party packages would have to be developed to implement specific runtime type checking functionality, for example using decorators or metaclasses. Using type hints for performance optimizations is left as an exercise for the reader. @@ -262,6 +262,11 @@ arguments with ``Callable``. Similarly, there is no support for specifying callback signatures with a variable number of argument of a specific type. +Because `typing.Callable` does double-duty as a replacement for +`collections.abc.Callable`, `isinstance(x, typing.Callable)` is +implemented by deferring to `isinstance(x, collections.abc.Callable)`. +However, `isinstance(x, typing.Callable[...])` is not supported. + Generics --------