[py3k] iterator.__next__()
authorRémi Cardona <remi.cardona@free.fr>
Fri, 25 Jul 2014 09:20:08 +0200
changeset 756 88264491da44
parent 755 e71e8fa36c64
child 757 0f79432aeca6
[py3k] iterator.__next__()
utils.py
--- a/utils.py	Fri Jul 25 00:28:13 2014 +0200
+++ b/utils.py	Fri Jul 25 09:20:08 2014 +0200
@@ -47,7 +47,7 @@
     def __iter__(self):
         return self
 
-    def next(self):
+    def __next__(self):
         while self.stop is None or self.index < self.stop:
             var = decompose_b26(self.index)
             self.index += 1
@@ -58,6 +58,9 @@
             return var
         raise StopIteration()
 
+    next = __next__
+
+
 KEYWORDS = set(('INSERT', 'SET', 'DELETE',
                 'UNION', 'WITH', 'BEING',
                 'WHERE', 'AND', 'OR', 'NOT',