[Python-ideas] PEP 479: Change StopIteration handling inside generators
Serhiy Storchaka
storchaka at gmail.com
Wed Nov 19 17:01:29 CET 2014
On 18.11.14 06:50, Guido van Rossum wrote:
> Separate from this special case, I am also worried about backward
> compatibility, and I have yet to get a good idea for how widespread code
> is that depends on StopIteration bubbling out from generators. I also
> don't have a good idea how often this issue bites users, but I have a
> feeling it does bite.
E.g. current difflib implementation depends on this behavior.
...
while True:
...
while(found_diff is False):
from_line, to_line, found_diff = next(line_pair_iterator)
...
More information about the Python-ideas
mailing list