mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
allow keyword args after *args in a function call
This commit is contained in:
parent
de0de885f7
commit
2d735bc098
6 changed files with 30 additions and 13 deletions
|
@ -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;
|
||||
|
|
|
@ -1598,7 +1598,8 @@ static arc arcs_73_5[2] = {
|
|||
static arc arcs_73_6[1] = {
|
||||
{0, 6},
|
||||
};
|
||||
static arc arcs_73_7[1] = {
|
||||
static arc arcs_73_7[2] = {
|
||||
{161, 5},
|
||||
{32, 3},
|
||||
};
|
||||
static state states_73[8] = {
|
||||
|
@ -1609,7 +1610,7 @@ static state states_73[8] = {
|
|||
{4, arcs_73_4},
|
||||
{2, arcs_73_5},
|
||||
{1, arcs_73_6},
|
||||
{1, arcs_73_7},
|
||||
{2, arcs_73_7},
|
||||
};
|
||||
static arc arcs_74_0[1] = {
|
||||
{24, 1},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue