summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-19 20:57:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-19 20:57:10 (GMT)
commit2d735bc09876e8216bf6708bb598923e07a2ac4b (patch)
treeb242296c96c8988ba3c783474c960432d13bef67 /Python/ast.c
parentde0de885f77d40ddb7e9f2afc8be5a99b9cf01ec (diff)
downloadcpython-2d735bc09876e8216bf6708bb598923e07a2ac4b.zip
cpython-2d735bc09876e8216bf6708bb598923e07a2ac4b.tar.gz
cpython-2d735bc09876e8216bf6708bb598923e07a2ac4b.tar.bz2
allow keyword args after *args in a function call
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 46bfd4e..6d2fa09 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1961,6 +1961,11 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
"non-keyword arg after keyword arg");
return NULL;
}
+ if (vararg) {
+ ast_error(CHILD(ch, 0),
+ "only named arguments may follow *expression");
+ return NULL;
+ }
e = ast_for_expr(c, CHILD(ch, 0));
if (!e)
return NULL;