Bug report
Reported here: #120330 (comment)
class Foo:
def __iter__(self):
assert False
a = [x for x in Foo()]
output (Python 3.12.5):
Traceback (most recent call last):
File "/home/frank/projects/executing/codi.py", line 5, in <module>
a = [x for x in Foo()]
^^^^^^^^^^^^^^^^^^
File "/home/frank/projects/executing/codi.py", line 3, in __iter__
assert False
^^^^^
AssertionError
Linked PRs