summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Parser/tokenizer.c
diff options
context:
space:
mode:
authorshadchin <[email protected]>2025-06-13 00:05:26 +0300
committershadchin <[email protected]>2025-06-13 00:35:30 +0300
commit796b9088366b10b4cd42885101fc20c0b5709b07 (patch)
treef287eacb0b95ffd7cabf95b16cafb4788645dc38 /contrib/tools/python3/Parser/tokenizer.c
parentc72bca862651e507d2ff4980ef7f4ff7267a7227 (diff)
Update Python 3 to 3.12.10
commit_hash:dd2398e159fe1d72ea6b12da52fccc933a41a785
Diffstat (limited to 'contrib/tools/python3/Parser/tokenizer.c')
-rw-r--r--contrib/tools/python3/Parser/tokenizer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/tools/python3/Parser/tokenizer.c b/contrib/tools/python3/Parser/tokenizer.c
index f35cd94d6d4..92f43b0079a 100644
--- a/contrib/tools/python3/Parser/tokenizer.c
+++ b/contrib/tools/python3/Parser/tokenizer.c
@@ -479,8 +479,11 @@ static int update_fstring_expr(struct tok_state *tok, char cur) {
break;
case '}':
case '!':
- case ':':
tok_mode->last_expr_end = strlen(tok->start);
+ case ':':
+ if (tok_mode->last_expr_end == -1) {
+ tok_mode->last_expr_end = strlen(tok->start);
+ }
break;
default:
Py_UNREACHABLE();