commit | 4af861cb4e3705d531e684f859f30df2a368bdc1 | [log] [tgz] |
---|---|---|
author | Sean Reifscheider <jafo@tummy.com> | Thu Mar 20 17:39:31 2008 +0000 |
committer | Sean Reifscheider <jafo@tummy.com> | Thu Mar 20 17:39:31 2008 +0000 |
tree | bff2a7e6680b4d76b8d982adbfc7c25e5bf51101 | |
parent | eff5a4e9014dfa8134d955ec69685e47cb6b03ed [diff] [blame] |
Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args and **kwargs expressions could give bogus error messages.
diff --git a/Python/ast.c b/Python/ast.c index 3381260..c7fd8bc 100644 --- a/Python/ast.c +++ b/Python/ast.c
@@ -1878,10 +1878,14 @@ } else if (TYPE(ch) == STAR) { vararg = ast_for_expr(c, CHILD(n, i+1)); + if (!vararg) + return NULL; i++; } else if (TYPE(ch) == DOUBLESTAR) { kwarg = ast_for_expr(c, CHILD(n, i+1)); + if (!kwarg) + return NULL; i++; } }