diff --git a/docs/source/generics.rst b/docs/source/generics.rst index 2fa0ecd65274..7193069efab1 100644 --- a/docs/source/generics.rst +++ b/docs/source/generics.rst @@ -653,6 +653,8 @@ Generic protocols can also be recursive. Example: result = last(L()) # Inferred type of 'result' is 'int' +.. _generic-type-aliases: + Generic type aliases ******************** diff --git a/docs/source/kinds_of_types.rst b/docs/source/kinds_of_types.rst index 26de4cffa732..28fd9f19db22 100644 --- a/docs/source/kinds_of_types.rst +++ b/docs/source/kinds_of_types.rst @@ -546,7 +546,8 @@ assigning the type to a variable: .. note:: A type alias does not create a new type. It's just a shorthand notation for - another type -- it's equivalent to the target type. + another type -- it's equivalent to the target type except for + :ref:`generic aliases `. .. _named-tuples: