diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 21:55:55 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 21:55:55 +0200 |
commit | 21ee18bdbc9a9d4500e12a1399d51c593b8b31d4 (patch) | |
tree | 35c498d3ec731bcf7b90ce66bce68ecd54659250 /python/libxml2.py | |
parent | de338c1adfa336ddb5177ceb5c63bcd868a0ebc7 (diff) | |
parent | 7300193becde71a344c8ac0973dc290fa24d800d (diff) | |
download | libxml2-21ee18bdbc9a9d4500e12a1399d51c593b8b31d4.tar.gz |
Merge tag 'upstream/2.9.1+dfsg1'
Upstream version 2.9.1+dfsg1
Diffstat (limited to 'python/libxml2.py')
-rw-r--r-- | python/libxml2.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/python/libxml2.py b/python/libxml2.py index 76b8dcd..9712d16 100644 --- a/python/libxml2.py +++ b/python/libxml2.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,7 +542,6 @@ class xmlCoreDepthFirstItertor: except IndexError: raise StopIteration self.node = parent.next - next = __next__ # # implements the breadth-first iterator for libxml2 DOM tree @@ -553,7 +552,7 @@ class xmlCoreBreadthFirstItertor: self.parents = [] def __iter__(self): return self - def __next__(self): + def next(self): while 1: if self.node: ret = self.node @@ -565,7 +564,6 @@ class xmlCoreBreadthFirstItertor: except IndexError: raise StopIteration self.node = parent.children - next = __next__ # # converters to present a nicer view of the XPath returns @@ -3365,10 +3363,8 @@ class xmlNode(xmlCore): def newNs(self, href, prefix): """Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing - one present on this node. Note that for a default - namespace, @prefix should be None. We use href==None in - the case of an element creation where the namespace was not - defined. """ + one present on this node. We use href==None in the case of + an element creation where the namespace was not defined. """ ret = libxml2mod.xmlNewNs(self._o, href, prefix) if ret is None:raise treeError('xmlNewNs() failed') __tmp = xmlNs(_obj=ret) |