diff options
author | Aron Xu <aron@debian.org> | 2015-09-21 22:58:06 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2015-09-21 22:58:06 +0800 |
commit | 2ee13d9e464a1f5daccaff58f5d09d36b7c4f667 (patch) | |
tree | b022967f880b7fb1e56c8cc4c3f200d6ffbc9efd /python/libxml.py | |
parent | 7300193becde71a344c8ac0973dc290fa24d800d (diff) | |
download | libxml2-2ee13d9e464a1f5daccaff58f5d09d36b7c4f667.tar.gz |
Revert "Imported Upstream version 2.9.1+dfsg1"upstream
This reverts commit 7300193becde71a344c8ac0973dc290fa24d800d.
Diffstat (limited to 'python/libxml.py')
-rw-r--r-- | python/libxml.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/libxml.py b/python/libxml.py index e507e0f..2466cc9 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -530,7 +530,7 @@ class xmlCoreDepthFirstItertor: self.parents = [] def __iter__(self): return self - def next(self): + def __next__(self): while 1: if self.node: ret = self.node @@ -542,6 +542,7 @@ class xmlCoreDepthFirstItertor: except IndexError: raise StopIteration self.node = parent.next + next = __next__ # # implements the breadth-first iterator for libxml2 DOM tree @@ -552,7 +553,7 @@ class xmlCoreBreadthFirstItertor: self.parents = [] def __iter__(self): return self - def next(self): + def __next__(self): while 1: if self.node: ret = self.node @@ -564,6 +565,7 @@ class xmlCoreBreadthFirstItertor: except IndexError: raise StopIteration self.node = parent.children + next = __next__ # # converters to present a nicer view of the XPath returns |