Skip to content

Commit acea424

Browse files
author
Scott Sanderson
committed
BUG: Use break instead of StopIteration to end loop.
Raising StopIteration from inside a generator isn't allowed from Python 3.7 onward.
1 parent 7ab8e1a commit acea424

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def zip_longest(left, right):
8080
right = repeat(None)
8181

8282
if left_done and right_done:
83-
raise StopIteration()
83+
break
8484

8585
yield left_yielded, right_yielded
8686

0 commit comments

Comments
 (0)