commit | c5440937efab6a99d54340c902dfb21e86874bc3 | [log] [tgz] |
---|---|---|
author | Mark Shannon <mark@hotpy.org> | Mon Mar 15 14:24:25 2021 +0000 |
committer | GitHub <noreply@github.com> | Mon Mar 15 14:24:25 2021 +0000 |
tree | 5f9e2fdfb14ba0a400dc5ae32d1c699658b04e00 | |
parent | 35d5068928ab5485e5f28b60b1e33062bc2c46cc [diff] [blame] |
Mark POP_TOP at end of expression statement as artificial, to conform to PEP 626. (GH-24860)
diff --git a/Python/compile.c b/Python/compile.c index 942614f..ea1bf6b 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; }