mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
set line and column numbers for keyword-only arg nodes (closes #20619)
This commit is contained in:
parent
15054c16c8
commit
0714b8b6ab
3 changed files with 7 additions and 2 deletions
|
@ -1203,6 +1203,8 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
|
|||
arg = arg(argname, annotation, c->c_arena);
|
||||
if (!arg)
|
||||
goto error;
|
||||
arg->lineno = LINENO(ch);
|
||||
arg->col_offset = ch->n_col_offset;
|
||||
asdl_seq_SET(kwonlyargs, j++, arg);
|
||||
i += 2; /* the name and the comma */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue