From: Alex Waygood Date: Tue, 25 Apr 2023 16:24:49 +0000 (-0600) Subject: gh-103721: Improve cross-references for generic-alias docs (#103838) X-Git-Tag: v3.12.0b1~421 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cef542ca572fdd402ff0e10093a0c1b459e5dcd6;p=thirdparty%2FPython%2Fcpython.git gh-103721: Improve cross-references for generic-alias docs (#103838) 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 --- diff --git a/Doc/library/types.rst b/Doc/library/types.rst index 54887f4c5198..a15fb5cfa494 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -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` + 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