mirror of
https://github.com/python/cpython.git
synced 2025-10-20 00:13:47 +00:00
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:
parent
246be21de1
commit
c5e77af131
13 changed files with 2097 additions and 2133 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue