summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorSean Reifscheider <jafo@tummy.com>2008-03-20 17:39:31 +0000
committerSean Reifscheider <jafo@tummy.com>2008-03-20 17:39:31 +0000
commitd06f22b6ecd96777ff61cf7cc72b92fcdcc6a37f (patch)
tree67e23a75b44fb128d606c8f90fba2b8985cf4700 /Python
parent3acbf38f2a37ca868b8098cb74bb88df33931e85 (diff)
downloadcpython-d06f22b6ecd96777ff61cf7cc72b92fcdcc6a37f.tar.gz
Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args
and **kwargs expressions could give bogus error messages.
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c4
1 files changed, 4 insertions, 0 deletions
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++;
}
}