Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b3f0ca

Browse files
committed
Fix for implicit tuple + default arguments, courtesy of Michael Hudson.
SF patch #103749
1 parent 5b0705d commit 2b3f0ca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/compile.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4667,7 +4667,9 @@ symtable_params(struct symtable *st, node *n)
46674667
for (j = 0; j <= complex; j++) {
46684668
c = CHILD(n, j);
46694669
if (TYPE(c) == COMMA)
4670-
c = CHILD(n, ++j);
4670+
c = CHILD(n, ++j);
4671+
else if (TYPE(c) == EQUAL)
4672+
c = CHILD(n, j += 3);
46714673
if (TYPE(CHILD(c, 0)) == LPAR)
46724674
symtable_params_fplist(st, CHILD(c, 1));
46734675
}

0 commit comments

Comments
 (0)