Skip to content

Commit 5c0394e

Browse files
asottileilevkivskyi
authored andcommitted
Mention exception for generic type aliases (#5478)
1 parent 324111d commit 5c0394e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/source/generics.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ Generic protocols can also be recursive. Example:
653653
654654
result = last(L()) # Inferred type of 'result' is 'int'
655655
656+
.. _generic-type-aliases:
657+
656658
Generic type aliases
657659
********************
658660

docs/source/kinds_of_types.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ assigning the type to a variable:
546546
.. note::
547547

548548
A type alias does not create a new type. It's just a shorthand notation for
549-
another type -- it's equivalent to the target type.
549+
another type -- it's equivalent to the target type except for
550+
:ref:`generic aliases <generic-type-aliases>`.
550551

551552
.. _named-tuples:
552553

0 commit comments

Comments
 (0)