]> granicus.if.org Git - python/commitdiff
Bug #1588287: fix invalid assertion for `1,2` in debug builds.
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 4 Nov 2006 19:25:22 +0000 (19:25 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 4 Nov 2006 19:25:22 +0000 (19:25 +0000)
Will backport

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

index 69e198015841bccdea248ca9e2dc224e6a84f523..14ce7e49a81239ce62059b6aaed26ca87e11d11e 100644 (file)
@@ -747,6 +747,8 @@ hello world
 
         x = `x`
         x = `1 or 2 or 3`
+        self.assertEqual(`1,2`, '(1, 2)')
+
         x = x
         x = 'x'
         x = 123
index 2ed93714e6abd5469e459f6dc64562152f26ec3f..0527d830c914d2aca2daedb4fa08976dcae84b1c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.6 alpha 1?
 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 f49026807f6fbad360931be6dc8e47ac27407ef1..dcf7f2b3ab08f85600cf711bd3af3010a0571354 100644 (file)
@@ -532,6 +532,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);