On Sat, Nov 22, 2014 at 3:37 AM, Donald Stufft <donald at stufft.io> wrote: > I don’t have an opinion on whether it’s enough of a big deal to actually change > it, but I do find wrapping it with a try: except block and returning easier > to understand. If you showed me the current code unless I really thought about > it I wouldn't think about the fact that the next() calls can cause the > generator to terminate. And don't forget, by the way, that you can always request the current behaviour by explicitly wrapping the body of the function in try/except: def izip(iterable1, iterable2): try: it1 = iter(iterable1) it2 = iter(iterable2) while True: v1 = next(it1) v2 = next(it2) yield v1, v2 except StopIteration: pass That's exactly what current behaviour does, and if you think that that try block is too broad and should be narrowed, then you should support this proposal :) ChrisA
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4