mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
[3.13] GH-127682: Backport GH-132351 (GH-132384)
Only call `__iter__` once in generator expressions
This commit is contained in:
parent
7ffef8d07b
commit
132bdf6990
5 changed files with 27 additions and 14 deletions
|
@ -5910,9 +5910,7 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
|
|||
}
|
||||
Py_CLEAR(co);
|
||||
|
||||
if (compiler_comprehension_iter(c, outermost)) {
|
||||
goto error;
|
||||
}
|
||||
VISIT(c, expr, outermost->iter);
|
||||
|
||||
ADDOP_I(c, loc, CALL, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue