Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: third_party/logilab/common/visitor.py

Issue 707353002: pylint: upgrade to 1.3.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/logilab/common/visitor.py
===================================================================
--- third_party/logilab/common/visitor.py (revision 292986)
+++ third_party/logilab/common/visitor.py (working copy)
@@ -35,12 +35,14 @@
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):
@@ -61,10 +63,10 @@
def _visit(self, node):
iterator = self._get_iterator(node)
- n = iterator.next()
+ n = next(iterator)
while n:
result = n.accept(self)
- n = iterator.next()
+ n = next(iterator)
return result
def _get_iterator(self, node):

Powered by Google App Engine
This is Rietveld 408576698