From df2bef1b4d9a20e2c9fe924fbf5ee3c1a2cf20eb Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 14 Aug 2018 08:39:45 -0700 Subject: [PATCH 1/2] Mention exception for generic type aliases --- docs/source/generics.rst | 2 ++ docs/source/kinds_of_types.rst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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..94de96cb25c8 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-type-aliases`. .. _named-tuples: From 82f13107aeda11d3b2e88ee5387b912f6274da31 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 14 Aug 2018 09:20:38 -0700 Subject: [PATCH 2/2] Update kinds_of_types.rst --- docs/source/kinds_of_types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/kinds_of_types.rst b/docs/source/kinds_of_types.rst index 94de96cb25c8..28fd9f19db22 100644 --- a/docs/source/kinds_of_types.rst +++ b/docs/source/kinds_of_types.rst @@ -547,7 +547,7 @@ assigning the type to a variable: 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 except for - :ref:`generic-type-aliases`. + :ref:`generic aliases `. .. _named-tuples: