Mollify PEP 0479.

This commit is contained in:
whitequark 2015-12-30 15:33:30 +08:00
parent 424ca53fa0
commit f52d364806
1 changed files with 4 additions and 1 deletions

View File

@ -236,7 +236,10 @@ class Phi(Instruction):
def incoming(self):
operand_iter = iter(self.operands)
while True:
yield next(operand_iter), next(operand_iter)
try:
yield next(operand_iter), next(operand_iter)
except StopIteration:
return
def incoming_blocks(self):
return (block for (block, value) in self.incoming())