diff Python/compile.c @ 16699:7334b2cedda8 legacy-trunk

Fix for implicit tuple + default arguments, courtesy of Michael Hudson. SF patch #103749
author Jeremy Hylton <jeremy@alum.mit.edu>
date Mon, 19 Feb 2001 23:52:49 +0000
parents 17ed61fd5b65
children 51977af230fa
line wrap: on
line diff
--- a/Python/compile.c	Mon Feb 19 22:37:24 2001 +0000
+++ b/Python/compile.c	Mon Feb 19 23:52:49 2001 +0000
@@ -4667,7 +4667,9 @@
 		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));
 		}