diff --git a/Python/compile.c b/Python/compile.c index 9f15254aab0..a01e72ad91c 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2139,8 +2139,9 @@ com_argdefs(c, n) nargs++; i++; if (i >= nch) - break; - t = TYPE(CHILD(n, i)); + t = RPAR; /* Anything except EQUAL or COMMA */ + else + t = TYPE(CHILD(n, i)); if (t == EQUAL) { i++; ndefs++;