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.
This commit is contained in:
Eric V. Smith
2019-05-27 15:31:52 -04:00
committed by GitHub
parent 695b1dd8cb
commit 6f6ff8a565
9 changed files with 87 additions and 100 deletions

View File

@@ -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':