itertools: CPython compatibility: raise StopIteration for cycle on empty sequence

pull/42/head
stijn 2015-08-25 14:00:26 +02:00
rodzic 2111e819e8
commit ebb0c60fac
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -4,7 +4,7 @@ def count(start=0, step=1):
start += step
def cycle(p):
while True:
while p:
yield from p
def repeat(el, n=None):