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

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

Issue 739393004: Revert "Revert "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
« no previous file with comments | « third_party/logilab/common/urllib2ext.py ('k') | third_party/pylint.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/common/visitor.py
===================================================================
--- third_party/logilab/common/visitor.py (revision 293047)
+++ 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):
« no previous file with comments | « third_party/logilab/common/urllib2ext.py ('k') | third_party/pylint.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698