summaryrefslogtreecommitdiff
path: root/wsgitools/filters.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2012-06-28 17:23:06 +0200
committerHelmut Grohne <helmut@subdivi.de>2012-06-28 17:23:06 +0200
commit53c7d892904c9f133d55f052a27dafd3911d0c5c (patch)
treec3452c5436bae1e327cf375abcce5c5524a853d8 /wsgitools/filters.py
parentfd38036b9f1693f8f368851d40928bc5922ce606 (diff)
downloadwsgitools-53c7d892904c9f133d55f052a27dafd3911d0c5c.tar.gz
provide py3 style __next__ methods
Diffstat (limited to 'wsgitools/filters.py')
-rw-r--r--wsgitools/filters.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsgitools/filters.py b/wsgitools/filters.py
index 4c7ff20..4305c9d 100644
--- a/wsgitools/filters.py
+++ b/wsgitools/filters.py
@@ -35,7 +35,7 @@ class CloseableIterator:
@rtype: gen()
"""
return self
- def next(self):
+ def __next__(self):
"""iterator interface"""
if not self.iterators:
raise StopIteration
@@ -44,6 +44,8 @@ class CloseableIterator:
except StopIteration:
self.iterators.pop(0)
return next(self)
+ def next(self):
+ return self.__next__()
__all__.append("CloseableList")
class CloseableList(list):