Add TypeGuard (PEP 647 draft) (#4879)

This commit is contained in:
Guido van Rossum
2020-12-30 14:31:40 -08:00
committed by GitHub
parent 91582e6921
commit dcaea8bf06
2 changed files with 4 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ if sys.version_info >= (3, 10):
def __init__(self, name: str) -> None: ...
Concatenate: _SpecialForm = ...
TypeAlias: _SpecialForm = ...
TypeGuard: _SpecialForm = ...
# Return type that indicates a function does not return.
# This type is equivalent to the None type, but the no-op Union is necessary to

View File

@@ -112,3 +112,6 @@ else:
__name__: str
def __init__(self, name: str) -> None: ...
Concatenate: _SpecialForm = ...
# PEP 647
TypeGuard: _SpecialForm = ...