minor change
This commit is contained in:
parent
a13757f87c
commit
6f7d8a055d
@ -49,8 +49,7 @@ class LazyList(object):
|
|||||||
|
|
||||||
def LazyListIterator():
|
def LazyListIterator():
|
||||||
count = start
|
count = start
|
||||||
predicate = ((lambda: True) if stop is None
|
predicate = (stop is None) and (lambda: True) or (lambda: count < stop)
|
||||||
else (lambda: count < stop))
|
|
||||||
while predicate():
|
while predicate():
|
||||||
try:
|
try:
|
||||||
yield self[count]
|
yield self[count]
|
||||||
|
Loading…
Reference in New Issue
Block a user