Martin,

>    def __iter__(self):
>        while True:
>            for logline in self.logfile:
>                heappush(self.heap, (timestamp(logline), logline))
>                if len(self.heap) >= self.jitter:
>                    break
>            try:
>                yield heappop(self.heap)
>            except IndexError:
>                raise StopIteration

In this __iter__ method, why are we wrapping a for loop in a while True?

S.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to