@@ -230,9 +230,11 @@ For example:
230230
231231 callback: Callable[[str], Awaitable[None]] = on_update
232232
233+ .. index :: single: ...; ellipsis literal
234+
233235The subscription syntax must always be used with exactly two values: the
234236argument list and the return type. The argument list must be a list of types,
235- a :class: `ParamSpec `, :data: `Concatenate `, or an ellipsis. The return type must
237+ a :class: `ParamSpec `, :data: `Concatenate `, or an ellipsis (`` ... ``) . The return type must
236238be a single type.
237239
238240If a literal ellipsis ``... `` is given as the argument list, it indicates that
@@ -375,8 +377,11 @@ accepts *any number* of type arguments::
375377 # but ``z`` has been assigned to a tuple of length 3
376378 z: tuple[int] = (1, 2, 3)
377379
380+ .. index :: single: ...; ellipsis literal
381+
378382To denote a tuple which could be of *any * length, and in which all elements are
379- of the same type ``T ``, use ``tuple[T, ...] ``. To denote an empty tuple, use
383+ of the same type ``T ``, use the literal ellipsis ``... ``: ``tuple[T, ...] ``.
384+ To denote an empty tuple, use
380385``tuple[()] ``. Using plain ``tuple `` as an annotation is equivalent to using
381386``tuple[Any, ...] ``::
382387
@@ -1162,6 +1167,8 @@ These can be used as types in annotations. They all support subscription using
11621167
11631168 Special form for annotating higher-order functions.
11641169
1170+ .. index :: single: ...; ellipsis literal
1171+
11651172 ``Concatenate `` can be used in conjunction with :ref: `Callable <annotating-callables >` and
11661173 :class: `ParamSpec ` to annotate a higher-order callable which adds, removes,
11671174 or transforms parameters of another
0 commit comments