From 6f6ff8a56518a80da406aad6ac8364c046cc7f18 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Mon, 27 May 2019 15:31:52 -0400 Subject: bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead (GH-13597) When using the "=" debug functionality of f-strings, use another Constant node (or a merged constant node) instead of adding expr_text to the FormattedValue node. --- Python/compile.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 425d0d68ac..f1c97bdfe4 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3963,12 +3963,6 @@ compiler_formatted_value(struct compiler *c, expr_ty e) int conversion = e->v.FormattedValue.conversion; int oparg; - if (e->v.FormattedValue.expr_text) { - /* Push the text of the expression (which already has the '=' in - it. */ - ADDOP_LOAD_CONST(c, e->v.FormattedValue.expr_text); - } - /* The expression to be formatted. */ VISIT(c, expr, e->v.FormattedValue.value); @@ -3991,11 +3985,6 @@ compiler_formatted_value(struct compiler *c, expr_ty e) /* And push our opcode and oparg */ ADDOP_I(c, FORMAT_VALUE, oparg); - /* If we have expr_text, join the 2 strings on the stack. */ - if (e->v.FormattedValue.expr_text) { - ADDOP_I(c, BUILD_STRING, 2); - } - return 1; } -- cgit v1.2.1