mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-127682: Only call __iter__
once in generator expressions. (GH-132351)
This commit is contained in:
parent
bc0b94b30c
commit
d87e7f3529
5 changed files with 27 additions and 15 deletions
|
@ -4775,10 +4775,7 @@ codegen_comprehension(compiler *c, expr_ty e, int type,
|
|||
}
|
||||
Py_CLEAR(co);
|
||||
|
||||
if (codegen_comprehension_iter(c, outermost)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
VISIT(c, expr, outermost->iter);
|
||||
ADDOP_I(c, loc, CALL, 0);
|
||||
|
||||
if (is_async_comprehension && type != COMP_GENEXP) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue