mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
[3.12] gh-129093: Fix f-string debug text sometimes getting cut off when expression contains ! (#129164)
This commit is contained in:
parent
b849a1b751
commit
e577ff4ce4
3 changed files with 21 additions and 3 deletions
|
@ -480,9 +480,7 @@ static int update_fstring_expr(struct tok_state *tok, char cur) {
|
|||
case '}':
|
||||
case '!':
|
||||
case ':':
|
||||
if (tok_mode->last_expr_end == -1) {
|
||||
tok_mode->last_expr_end = strlen(tok->start);
|
||||
}
|
||||
tok_mode->last_expr_end = strlen(tok->start);
|
||||
break;
|
||||
default:
|
||||
Py_UNREACHABLE();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue