From 4af861cb4e3705d531e684f859f30df2a368bdc1 Mon Sep 17 00:00:00 2001 From: Sean Reifscheider Date: Thu, 20 Mar 2008 17:39:31 +0000 Subject: Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args and **kwargs expressions could give bogus error messages. --- Python/ast.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/ast.c') diff --git a/Python/ast.c b/Python/ast.c index 3381260d07..c7fd8bcc96 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -1878,10 +1878,14 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func) } 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++; } } -- cgit v1.2.1