Fixed serious error in fxrange introduced today

This commit is contained in:
Ask Solem 2011-01-07 13:31:40 +01:00
parent 39b1c5c81d
commit 4c463808f7
1 changed files with 2 additions and 3 deletions

View File

@ -62,12 +62,11 @@ def fxrange(start=1.0, stop=None, step=1.0, repeatlast=False):
while 1:
if cur <= stop:
yield cur
if cur + step <= stop:
cur += step
cur += step
else:
if not repeatlast:
break
yield cur
yield cur - step
def retry_over_time(fun, catch, args=[], kwargs={}, errback=None,