]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix bug with missing default for last arg (discovered by Tommy Burnette)
authorGuido van Rossum <guido@python.org>
Mon, 18 Sep 1995 21:44:04 +0000 (21:44 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 18 Sep 1995 21:44:04 +0000 (21:44 +0000)
Python/compile.c

index 9f15254aab0b2990413edf9396caaed961fbe9a1..a01e72ad91c32e51b7e5857550e6c0f4a92eabc1 100644 (file)
@@ -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++;