summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-13 19:22:14 -0500
committerBenjamin Peterson <benjamin@python.org>2014-02-13 19:22:14 -0500
commit7db8407b4a886f4cb7ed14f58bee496cf09dc3b0 (patch)
treed475390e450d0eebf52897f1ea0cbd45e263242a /Python
parentb550676a449adcc62aaa1fae2de77a4f75d995c2 (diff)
downloadcpython-7db8407b4a886f4cb7ed14f58bee496cf09dc3b0.tar.gz
set line and column numbers for keyword-only arg nodes (closes #20619)
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 3bd24fdb14..5668755346 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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;