summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-11 11:28:30 (GMT)
committerGitHub <noreply@github.com>2022-01-11 11:28:30 (GMT)
commitbd04fac7eb929cd11ab6985deb61d9780447fbff (patch)
treefa1f7cd473f62ffa309b0c0b48d88a655a4a7e35 /Python/compile.c
parentea1a54506b4ac38b712ba63ec884292025f16111 (diff)
downloadcpython-bd04fac7eb929cd11ab6985deb61d9780447fbff.zip
cpython-bd04fac7eb929cd11ab6985deb61d9780447fbff.tar.gz
cpython-bd04fac7eb929cd11ab6985deb61d9780447fbff.tar.bz2
bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 590ca9d..0d821d4 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2034,6 +2034,7 @@ compiler_body(struct compiler *c, asdl_stmt_seq *stmts)
st = (stmt_ty)asdl_seq_GET(stmts, 0);
assert(st->kind == Expr_kind);
VISIT(c, expr, st->v.Expr.value);
+ UNSET_LOC(c);
if (!compiler_nameop(c, __doc__, Store))
return 0;
}