def infinite_sleeps(sleep_for):
 for i in count():
  (yield i)
  time.sleep(sleep_for)

def infinite_sleeps ( sleep_for ) : for i in count ( ) : ( yield i ) time . sleep ( sleep_for )
generator that will sleep between each yield .