PEP 526: Add another example of tuple packing (#1096)

This commit is contained in:
Ivan Levkivskyi 2019-06-03 00:39:19 +01:00 committed by GitHub
parent 48499b5ff4
commit 66f4c95d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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