mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
allow keyword args to be passed in after *args #3473
This commit is contained in:
parent
d9ccf8c547
commit
80f0ed5bb1
5 changed files with 29 additions and 12 deletions
|
@ -1898,6 +1898,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;
|
||||
|
|
|
@ -1609,7 +1609,8 @@ static arc arcs_74_5[2] = {
|
|||
static arc arcs_74_6[1] = {
|
||||
{0, 6},
|
||||
};
|
||||
static arc arcs_74_7[1] = {
|
||||
static arc arcs_74_7[2] = {
|
||||
{162, 5},
|
||||
{31, 3},
|
||||
};
|
||||
static state states_74[8] = {
|
||||
|
@ -1620,7 +1621,7 @@ static state states_74[8] = {
|
|||
{4, arcs_74_4},
|
||||
{2, arcs_74_5},
|
||||
{1, arcs_74_6},
|
||||
{1, arcs_74_7},
|
||||
{2, arcs_74_7},
|
||||
};
|
||||
static arc arcs_75_0[1] = {
|
||||
{28, 1},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue