Little addition.

This commit is contained in:
Georg Brandl 2007-05-02 21:45:29 +00:00
parent 0c4dbfca14
commit a4f91773f4
1 changed files with 5 additions and 1 deletions

View File

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