From bd04fac7eb929cd11ab6985deb61d9780447fbff Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 11 Jan 2022 11:28:30 +0000 Subject: bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518) --- Python/compile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 590ca9dbfc6..0d821d4183f 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; } -- cgit v1.3.1