From c5440937efab6a99d54340c902dfb21e86874bc3 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Mon, 15 Mar 2021 14:24:25 +0000 Subject: Mark POP_TOP at end of expression statement as artificial, to conform to PEP 626. (GH-24860) --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 942614fdab8..ea1bf6bf923 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3397,6 +3397,8 @@ compiler_visit_stmt_expr(struct compiler *c, expr_ty value) } VISIT(c, expr, value); + /* Mark POP_TOP as artificial */ + c->u->u_lineno = -1; ADDOP(c, POP_TOP); return 1; } -- cgit v1.2.3