[Lxml-checkins] r46717 - lxml/trunk/src/lxml
scoder at codespeak.net
scoder at codespeak.net
Tue Sep 18 12:31:21 CEST 2007
Author: scoder
Date: Tue Sep 18 12:31:20 2007
New Revision: 46717
Modified:
lxml/trunk/src/lxml/objectify.pyx
Log:
iterfind() in objectify
Modified: lxml/trunk/src/lxml/objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/objectify.pyx (original)
+++ lxml/trunk/src/lxml/objectify.pyx Tue Sep 18 12:31:20 2007
@@ -363,6 +363,12 @@
sibling = self.__getitem__(key)
parent.remove(sibling)
+ def iterfind(self, path):
+ # Reimplementation of Element.iterfind() to make it work without child
+ # iteration.
+ xpath = etree.ETXPath(path)
+ return iter(xpath(self))
+
def findall(self, path):
# Reimplementation of Element.findall() to make it work without child
# iteration.
More information about the lxml-checkins
mailing list