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
commit80fffc466514b679880bed535cd45f96e4ec4939 (patch)
tree1e050309b1c002467d61fa5f0592fa623609a631 /Python
parent007686f802274e7df47e5cc81d55545884ff861b (diff)
downloadcpython-80fffc466514b679880bed535cd45f96e4ec4939.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;