diff options
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c index fafa25310b..9664590055 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -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; |