-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
def gen():
print(2)
yield 3
print(4)
print(next(gen()))
3.12 events
call 14: def gen():
line 15: print(2)
line 16: yield 3
retu 16: yield 3
call 16: yield 3
exce 16: yield 3
retu 16: yield 3
main:
call 14: def gen():
line 15: print(2)
line 16: yield 3
retu 16: yield 3
Note the extra except
and return
events for 3.12.
Originally discovered by @nedbat #113680 (comment)
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
No response
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error