diff options
author | Mark Shannon <mark@hotpy.org> | 2025-04-11 09:37:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-11 09:37:22 +0100 |
commit | d87e7f35297d34755026173d84a38eedfbed78de (patch) | |
tree | 31e12005dd68286e3afa77de7272d83c703e05b5 /Python | |
parent | bc0b94b30c9d65ba550daee2c2ef20035defd980 (diff) | |
download | cpython-d87e7f35297d34755026173d84a38eedfbed78de.tar.gz cpython-d87e7f35297d34755026173d84a38eedfbed78de.zip |
GH-127682: Only call `__iter__` once in generator expressions. (GH-132351)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/codegen.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index 379d37c65ca..35b46dcdc40 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -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) { |