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:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user