]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-103721: Improve cross-references for generic-alias docs (GH-103838) (#103840)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 25 Apr 2023 22:58:25 +0000 (15:58 -0700)
committerGitHub <noreply@github.com>
Tue, 25 Apr 2023 22:58:25 +0000 (22:58 +0000)
Cc. @adriangb

The "stub documentation" in `types.rst` does already link to the
in-depth docs in `stdtypes.rst`, but the link isn't obvious for new
users. It deserves to be made more prominent.

- Issue: https://github.com/python/cpython/issues/103721
(cherry picked from commit cef542ca572fdd402ff0e10093a0c1b459e5dcd6)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Doc/library/types.rst

index daca0ea4318bc5bf2b5a401e25e1de30ea8f2eac..89d30156fc73a1f16416736706b92c84da2009c2 100644 (file)
@@ -311,6 +311,13 @@ Standard names are defined for the following types:
    .. versionchanged:: 3.9.2
       This type can now be subclassed.
 
+   .. seealso::
+
+      :ref:`Generic Alias Types<types-genericalias>`
+         In-depth documentation on instances of :class:`!types.GenericAlias`
+
+      :pep:`585` - Type Hinting Generics In Standard Collections
+         Introducing the :class:`!types.GenericAlias` class
 
 .. class:: UnionType