diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2021-11-04 04:06:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-04 04:06:34 (GMT) |
commit | e03e50377d6f8f212af60fed4ae405ebeb73237d (patch) | |
tree | 41adfbe583412767e3d6f739eec5161e553b0afb /Doc | |
parent | c2739867113a2b650db300c03ef06cf18dcee3f4 (diff) | |
download | cpython-e03e50377d6f8f212af60fed4ae405ebeb73237d.zip cpython-e03e50377d6f8f212af60fed4ae405ebeb73237d.tar.gz cpython-e03e50377d6f8f212af60fed4ae405ebeb73237d.tar.bz2 |
bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/typing.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index eb95af3..79ca2e9 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -49,8 +49,8 @@ annotations. These include: *Introducing* :class:`Protocol` and the :func:`@runtime_checkable<runtime_checkable>` decorator * :pep:`585`: Type Hinting Generics In Standard Collections - *Introducing* the ability to use builtin collections and ABCs as - :term:`generic types<generic type>` + *Introducing* :class:`types.GenericAlias` and the ability to use standard + library classes as :ref:`generic types<types-genericalias>` * :pep:`586`: Literal Types *Introducing* :data:`Literal` * :pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys @@ -291,8 +291,8 @@ A user-defined class can be defined as a generic class. single type parameter ``T`` . This also makes ``T`` valid as a type within the class body. -The :class:`Generic` base class defines :meth:`__class_getitem__` so that -``LoggedVar[t]`` is valid as a type:: +The :class:`Generic` base class defines :meth:`~object.__class_getitem__` so +that ``LoggedVar[t]`` is valid as a type:: from collections.abc import Iterable |