Little addition.
This commit is contained in:
parent
0c4dbfca14
commit
a4f91773f4
|
@ -87,7 +87,7 @@ This, however, is valid syntax::
|
|||
Note that this proposal also applies to tuples in implicit assignment
|
||||
context, such as in a ``for`` statement::
|
||||
|
||||
for (a, *b) in [(1, 2, 3), (4, 5, 6, 7)]:
|
||||
for a, *b in [(1, 2, 3), (4, 5, 6, 7)]:
|
||||
print(b)
|
||||
|
||||
would print out ::
|
||||
|
@ -95,6 +95,10 @@ would print out ::
|
|||
[2, 3]
|
||||
[5, 6, 7]
|
||||
|
||||
Starred expressions are only allowed as assignment targets, using them
|
||||
anywhere else (except for star-args in function calls, of course) is an
|
||||
error.
|
||||
|
||||
|
||||
Implementation
|
||||
==============
|
||||
|
|
Loading…
Reference in New Issue