summaryrefslogtreecommitdiffstats
path: root/Python/ast_unparse.c
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2019-05-27 19:31:52 (GMT)
committerGitHub <noreply@github.com>2019-05-27 19:31:52 (GMT)
commit6f6ff8a56518a80da406aad6ac8364c046cc7f18 (patch)
tree645d87649541f53b0ea4180a5f886c84320453fa /Python/ast_unparse.c
parent695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 (diff)
downloadcpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.zip
cpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.tar.gz
cpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.tar.bz2
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.
Diffstat (limited to 'Python/ast_unparse.c')
-rw-r--r--Python/ast_unparse.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/ast_unparse.c b/Python/ast_unparse.c
index f1b991a..f376e86 100644
--- a/Python/ast_unparse.c
+++ b/Python/ast_unparse.c
@@ -665,11 +665,6 @@ append_formattedvalue(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec)
}
Py_DECREF(temp_fv_str);
- if (e->v.FormattedValue.expr_text) {
- /* Use the = for debug text expansion. */
- APPEND_STR("=");
- }
-
if (e->v.FormattedValue.conversion > 0) {
switch (e->v.FormattedValue.conversion) {
case 'a':