[libxml2] Fix tree iterators broken by 2to3 script
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix tree iterators broken by 2to3 script
- Date: Mon, 1 Apr 2013 05:34:41 +0000 (UTC)
commit 87f3287d9b00bdc39be032a8a3f2d46860eaf787
Author: Daniel Veillard <veillard redhat com>
Date: Mon Apr 1 13:33:42 2013 +0800
Fix tree iterators broken by 2to3 script
python/libxml.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/python/libxml.py b/python/libxml.py
index b634982..117de82 100644
--- a/python/libxml.py
+++ b/python/libxml.py
@@ -528,7 +528,7 @@ class xmlCoreDepthFirstItertor:
self.parents = []
def __iter__(self):
return self
- def __next__(self):
+ def next(self):
while 1:
if self.node:
ret = self.node
@@ -539,7 +539,7 @@ class xmlCoreDepthFirstItertor:
parent = self.parents.pop()
except IndexError:
raise StopIteration
- self.node = parent.__next__
+ self.node = parent.next
#
# implements the breadth-first iterator for libxml2 DOM tree
@@ -550,12 +550,12 @@ class xmlCoreBreadthFirstItertor:
self.parents = []
def __iter__(self):
return self
- def __next__(self):
+ def next(self):
while 1:
if self.node:
ret = self.node
self.parents.append(self.node)
- self.node = self.node.__next__
+ self.node = self.node.next
return ret
try:
parent = self.parents.pop()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]