The type of an empty tuple is spelled Tuple[()]. Fixes upstream #231.
This commit is contained in:
parent
2ec3031a74
commit
02a9d6de10
|
@ -1507,6 +1507,7 @@ Fundamental building blocks:
|
||||||
|
|
||||||
* Tuple, used by listing the element types, for example
|
* Tuple, used by listing the element types, for example
|
||||||
``Tuple[int, int, str]``.
|
``Tuple[int, int, str]``.
|
||||||
|
The empty tuple can be typed as ``Tuple[()]``.
|
||||||
Arbitrary-length homogeneous tuples can be expressed
|
Arbitrary-length homogeneous tuples can be expressed
|
||||||
using one type and ellipsis, for example ``Tuple[int, ...]``.
|
using one type and ellipsis, for example ``Tuple[int, ...]``.
|
||||||
(The ``...`` here are part of the syntax, a literal ellipsis.)
|
(The ``...`` here are part of the syntax, a literal ellipsis.)
|
||||||
|
|
Loading…
Reference in New Issue