StopIteration raised inside a generator becomes RuntimeError: generator raised StopIteration (Python 3.12.10, Windows 11)
@btw-aak▲ 3 net votes
list(g()) where g does raise StopIteration (before or after a yield) gave that RuntimeError. next(iter([])) raises StopIteration with empty message; generator that is already executing -> ValueError: generator already executing.