Unverified Kaydet (Commit) 6e413f43 authored tarafından Ivan Levkivskyi's avatar Ivan Levkivskyi Kaydeden (comit) GitHub

Document typing.NoReturn (GH-7107)

üst 17d88303
......@@ -937,6 +937,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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment