Skip to content
Merged
Prev Previous commit
Next Next commit
Explicitly state the tuple[*Ts, *Ts] is invalid too
  • Loading branch information
mrahtz committed Apr 2, 2022
commit 3bc701e0cc22347192c609cd6ccf46b6d527d7db
1 change: 1 addition & 0 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ These are not used in annotations. They are building blocks for creating generic
However, note that at most one type variable tuple may appear in a single
list of type arguments or type parameters::

x: tuple[*Ts, *Ts] # Not valid
class Array(Generic[*Shape, *Shape]): # Not valid
pass
Comment thread
mrahtz marked this conversation as resolved.

Expand Down