]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103721: Improve cross-references for generic-alias docs (#103838)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Tue, 25 Apr 2023 16:24:49 +0000 (10:24 -0600)
committerGitHub <noreply@github.com>
Tue, 25 Apr 2023 16:24:49 +0000 (10:24 -0600)
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

Doc/library/types.rst

index 54887f4c51983aaa369a68040a3ac14fa9b1337a..a15fb5cfa494739ce9f27859bd6779542188bd97 100644 (file)
@@ -351,6 +351,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