From 6cf09c7658532e0bdaa1eeb5414a3de129bd0b40 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 29 Dec 2011 01:43:20 +0100 Subject: [PATCH 1/1] Fixed python3 iterator protocol. --- wrw/dispatch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrw/dispatch.py b/wrw/dispatch.py index 50adc04..709cfe4 100644 --- a/wrw/dispatch.py +++ b/wrw/dispatch.py @@ -20,17 +20,17 @@ class iterproxy(object): self.bk = real self.bki = iter(real) self._next = [None] - self.next() + self.__next__() def __iter__(self): return self - def next(self): + def __next__(self): if self._next is None: raise StopIteration() ret = self._next[0] try: - self._next[:] = [self.bki.next()] + self._next[:] = [self.bki.__next__()] except StopIteration: self._next = None return ret -- 2.11.0