GH-127682: Only call __iter__ once in generator expressions. (GH-132351)

This commit is contained in:
Mark Shannon 2025-04-11 09:37:22 +01:00 committed by GitHub
parent bc0b94b30c
commit d87e7f3529
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 15 deletions

View file

@ -204,7 +204,6 @@ dis_bug1333982 = """\
LOAD_CONST 1 (<code object <genexpr> at 0x..., file "%s", line %d>)
MAKE_FUNCTION
LOAD_FAST_BORROW 0 (x)
GET_ITER
CALL 0
%3d LOAD_SMALL_INT 1
@ -821,7 +820,6 @@ Disassembly of <code object foo at 0x..., file "%s", line %d>:
MAKE_FUNCTION
SET_FUNCTION_ATTRIBUTE 8 (closure)
LOAD_DEREF 1 (y)
GET_ITER
CALL 0
CALL 1
RETURN_VALUE