Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Parser/action_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1467,9 +1467,10 @@ _get_interpolation_conversion(Parser *p, Token *debug, ResultTokenWithMetadata *
Py_UCS4 first = PyUnicode_READ_CHAR(conversion_expr->v.Name.id, 0);
return Py_SAFE_DOWNCAST(first, Py_UCS4, int);
}
else if (debug && !format) {
/* If no conversion is specified, use !r for debug expressions */
return (int)'r';
else if (debug) {
// If no conversion and no format are specified, use !r for debug expressions;
// otherwise, if a format is specified, use !s.
return format ? (int)'s' : (int)'r';
}
return -1;
}
Expand Down