]> granicus.if.org Git - python/commitdiff
Fix for implicit tuple + default arguments, courtesy of Michael Hudson.
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 19 Feb 2001 23:52:49 +0000 (23:52 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 19 Feb 2001 23:52:49 +0000 (23:52 +0000)
SF patch #103749

Python/compile.c

index bc568c9e668b13f4eb436477229162869c44998d..f2d424b291b550c1bbff26f2ba14f89fbec63f54 100644 (file)
@@ -4667,7 +4667,9 @@ symtable_params(struct symtable *st, node *n)
                for (j = 0; j <= complex; j++) {
                        c = CHILD(n, j);
                        if (TYPE(c) == COMMA)
-                           c = CHILD(n, ++j);
+                               c = CHILD(n, ++j);
+                       else if (TYPE(c) == EQUAL)
+                               c = CHILD(n, j += 3);
                        if (TYPE(CHILD(c, 0)) == LPAR)
                                symtable_params_fplist(st, CHILD(c, 1));
                }