The type of an empty tuple is spelled Tuple[()]. Fixes upstream #231.

This commit is contained in:
Guido van Rossum 2016-06-06 13:43:37 -07:00
parent 2ec3031a74
commit 02a9d6de10
1 changed files with 1 additions and 0 deletions

View File

@ -1507,6 +1507,7 @@ Fundamental building blocks:
* Tuple, used by listing the element types, for example
``Tuple[int, int, str]``.
The empty tuple can be typed as ``Tuple[()]``.
Arbitrary-length homogeneous tuples can be expressed
using one type and ellipsis, for example ``Tuple[int, ...]``.
(The ``...`` here are part of the syntax, a literal ellipsis.)