diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 4a8f2f8e12e..bd6f3a95fe6 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -938,6 +938,18 @@ The module defines the following classes, functions and decorators: * Every type is compatible with :data:`Any`. * :data:`Any` is compatible with every type. +.. data:: NoReturn + + Special type indicating that a function never returns. + For example:: + + from typing import NoReturn + + def stop() -> NoReturn: + raise RuntimeError('no way') + + .. versionadded:: 3.6.5 + .. data:: Union Union type; ``Union[X, Y]`` means either X or Y.