mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again.
This commit is contained in:
parent
3b9be2ae6f
commit
edef2be4af
4 changed files with 14 additions and 2 deletions
|
@ -531,6 +531,11 @@ n = 0
|
|||
for x in Squares(10): n = n+x
|
||||
if n != 285: raise TestFailed, 'for over growing sequence'
|
||||
|
||||
result = []
|
||||
for x, in [(1,), (2,), (3,)]:
|
||||
result.append(x)
|
||||
vereq(result, [1, 2, 3])
|
||||
|
||||
print 'try_stmt'
|
||||
### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite]
|
||||
### | 'try' ':' suite 'finally' ':' suite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue