Skip to content

Commit 1a2297f

Browse files
committed
PPermut: Raise a StopIteration when all permutations are complete
1 parent 51a892b commit 1a2297f

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

isobar/pattern/sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def __next__(self):
401401
self.pos = 0
402402

403403
if self.permindex >= len(self.permutations):
404-
return None
404+
raise StopIteration
405405

406406
rv = self.permutations[self.permindex][self.pos]
407407
self.pos += 1

0 commit comments

Comments
 (0)