Commit 86336761 authored by Kipp Cannon's avatar Kipp Cannon

iterutils: update for PEP 479

- I don't hvae a test environment to confirm that this patch is correct,
  someone who can reproduce the problem will have to check
parent 49b733b1
Pipeline #48882 passed with stages
in 7 minutes and 39 seconds
......@@ -320,11 +320,16 @@ def inorder(*iterables, **kwargs):
del nextvals[next_]
if len(nextvals) < 2:
break
# exactly one sequence remains, short circuit and drain it
# exactly one sequence remains, short circuit and drain it. since
# PEP 479 we must trap the StopIteration and terminate the loop
# manually
(_, val, next_), = values()
yield val
while 1:
yield next_()
try:
while 1:
yield next_()
except StopIteration:
pass
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment