File tree 3 files changed +8
-0
lines changed 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ Type Description
13
13
``bytes `` 8-bit string
14
14
``object `` an arbitrary object (``object `` is the common base class)
15
15
``List[str] `` list of ``str `` objects
16
+ ``Tuple[int, int] `` tuple of two ``int``s (``Tuple[()] `` is the empty tuple)
17
+ ``Tuple[int, ...] `` tuple of an arbitrary number of ``int `` objects
16
18
``Dict[str, int] `` dictionary from ``str `` keys to ``int `` values
17
19
``Iterable[int] `` iterable object containing ints
18
20
``Sequence[bool] `` sequence of booleans
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ Built-in types
33
33
x = [1 ] # type: List [ int ]
34
34
x = set ([6 , 7 ]) # type: Set [ int ]
35
35
36
+ # Empty Tuple types are a bit special
37
+ x = () # type: Tuple [()]
38
+
36
39
# For mappings, we need the types of both keys and values.
37
40
x = dict (field = 2.0 ) # type: Dict [ str , float ]
38
41
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ Built-in types
34
34
x = [1 ] # type: List [ int ]
35
35
x = {6 , 7 } # type: Set [ int ]
36
36
37
+ # Empty Tuple types are a bit special
38
+ x = () # type: Tuple [()]
39
+
37
40
# For mappings, we need the types of both keys and values.
38
41
x = {' field' : 2.0 } # type: Dict [ str , float ]
39
42
You can’t perform that action at this time.
0 commit comments