gh-132661: Disallow Template/str concatenation after PEP 750 spec update (#135996)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
Dave Peck 2025-07-20 23:44:26 -07:00 committed by GitHub
parent 246be21de1
commit c5e77af131
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 2097 additions and 2133 deletions

View file

@ -4081,16 +4081,6 @@ codegen_template_str(compiler *c, expr_ty e)
}
else {
VISIT(c, expr, value);
Py_ssize_t j;
for (j = i + 1; j < value_count; j++) {
value = asdl_seq_GET(e->v.TemplateStr.values, j);
if (value->kind == Interpolation_kind) {
break;
}
VISIT(c, expr, value);
ADDOP_INPLACE(c, loc, Add);
}
i = j - 1;
stringslen++;
last_was_interpolation = 0;
}