]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 52621:
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 4 Nov 2006 19:32:54 +0000 (19:32 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 4 Nov 2006 19:32:54 +0000 (19:32 +0000)
Bug #1588287: fix invalid assertion for `1,2` in debug builds.

Lib/test/test_grammar.py
Misc/NEWS
Python/ast.c

index c39e41699e9021f720b9e7b74a885715bfe070de..76483f676a0389d686c0e0cb2f4364daa9d58913 100644 (file)
@@ -709,6 +709,7 @@ x = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6}
 
 x = `x`
 x = `1 or 2 or 3`
+x = `1,2`
 x = x
 x = 'x'
 x = 123
index 8db0bc40af0d06c3000ab86a4e6ef7608670fa87..9631d4f03f4e71e62e7b7f7a4e11bb91566fcf2a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.5.1c1?
 Core and builtins
 -----------------
 
+- Bug #1588287: fix invalid assertion for `1,2` in debug builds.
+
 - Bug #1576657: when setting a KeyError for a tuple key, make sure that
   the tuple isn't used as the "exception arguments tuple".
 
index 52c098ff3bad399d08821d5733e61fbf7e298f9c..6551063a7b8734fbf3f22e9645f251c85d4b388d 100644 (file)
@@ -538,6 +538,7 @@ seq_for_testlist(struct compiling *c, const node *n)
           || TYPE(n) == listmaker
           || TYPE(n) == testlist_gexp
           || TYPE(n) == testlist_safe
+          || TYPE(n) == testlist1
           );
 
     seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena);