Skip to content

Revert revert: fix StopIteration raising

Amael Tardif requested to merge revert-revert into master

A for loop raises StopIteration by itself after using all elements. Thus, instead of yielding a stop iteration we must return without yielding any more objects.

Alternatively, we could send a StopIteration to the generator if the obj is a StopIteration

gen.send(StopIteration)

Merge request reports