mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args
and **kwargs expressions could give bogus error messages.
This commit is contained in:
parent
eff5a4e901
commit
4af861cb4e
3 changed files with 11 additions and 0 deletions
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue