mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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:
parent
695b1dd8cb
commit
6f6ff8a565
9 changed files with 87 additions and 100 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue