kopia lustrzana https://github.com/micropython/micropython-lib
itertools: CPython compatibility: raise StopIteration for cycle on empty sequence
rodzic
2111e819e8
commit
ebb0c60fac
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue