summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-02-14 00:22:14 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-02-14 00:22:14 (GMT)
commite84fde981dd957f53ec81e2d6f14a7cf418a9925 (patch)
treee7f181a4d2f86dde6d1dd7b755bf3550fcf1ec73 /Python/ast.c
parent933538edde3bfe856f66d6c893ed4d3399769f94 (diff)
downloadcpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.zip
cpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.tar.gz
cpython-e84fde981dd957f53ec81e2d6f14a7cf418a9925.tar.bz2
set line and column numbers for keyword-only arg nodes (closes #20619)
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 3bd24fd..5668755 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;