diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-12 05:26:17 (GMT) |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-12 05:26:17 (GMT) |
| commit | edef2be4af973f1766b593cf48188db2e320dcbe (patch) | |
| tree | 3daf8d96b916450d9f214851e0194c41c2243a42 /Lib/test/test_grammar.py | |
| parent | 3b9be2ae6f5491737ebc65ee525884da218368d4 (diff) | |
| download | cpython-edef2be4af973f1766b593cf48188db2e320dcbe.zip cpython-edef2be4af973f1766b593cf48188db2e320dcbe.tar.gz cpython-edef2be4af973f1766b593cf48188db2e320dcbe.tar.bz2 | |
Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again.
Diffstat (limited to 'Lib/test/test_grammar.py')
| -rw-r--r-- | Lib/test/test_grammar.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 4bb4e45..f160867 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -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 |
