Index: third_party/logilab/common/visitor.py |
diff --git a/third_party/logilab/common/visitor.py b/third_party/logilab/common/visitor.py |
index ed2b70f96120776a7c6a8935ecbaa1a5ae8dd566..802d2befced41e4574243f02e8f6ef202e7859eb 100644 |
--- a/third_party/logilab/common/visitor.py |
+++ b/third_party/logilab/common/visitor.py |
@@ -35,14 +35,12 @@ class FilteredIterator(object): |
filter_func = no_filter |
self._list = list_func(node, filter_func) |
- def __next__(self): |
+ def next(self): |
try: |
return self._list.pop(0) |
except : |
return None |
- next = __next__ |
- |
# Base Visitor ################################################################ |
class Visitor(object): |
@@ -63,10 +61,10 @@ class Visitor(object): |
def _visit(self, node): |
iterator = self._get_iterator(node) |
- n = next(iterator) |
+ n = iterator.next() |
while n: |
result = n.accept(self) |
- n = next(iterator) |
+ n = iterator.next() |
return result |
def _get_iterator(self, node): |