PEP 526: Add another example of tuple packing (#1096)
This commit is contained in:
parent
48499b5ff4
commit
66f4c95d8e
|
@ -177,6 +177,8 @@ one to annotate the types of variables when tuple unpacking is used::
|
|||
|
||||
# Tuple packing with variable annotation syntax
|
||||
t: Tuple[int, ...] = (1, 2, 3)
|
||||
# or
|
||||
t: Tuple[int, ...] = 1, 2, 3 # This only works in Python 3.8+
|
||||
|
||||
# Tuple unpacking with variable annotation syntax
|
||||
header: str
|
||||
|
|
Loading…
Reference in New Issue