mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
Fix #1474677, non-keyword argument following keyword.
This commit is contained in:
parent
02104df4c8
commit
5ef922447c
2 changed files with 8 additions and 0 deletions
|
@ -1750,6 +1750,11 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
|
|||
if (TYPE(ch) == argument) {
|
||||
expr_ty e;
|
||||
if (NCH(ch) == 1) {
|
||||
if (nkeywords) {
|
||||
ast_error(CHILD(ch, 0),
|
||||
"non-keyword arg after keyword arg");
|
||||
return NULL;
|
||||
}
|
||||
e = ast_for_expr(c, CHILD(ch, 0));
|
||||
if (!e)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue