On Fri, 2006-05-26 at 16:39 +0200, Fredrik Lundh wrote:
Tres Seaver wrote:
Honestly, unless there are good reasons to do it, I'm absolutely +1 for keeping the current state.
Agreed, this is a no broainer. If your application needs to be compatible with ET/cET, use the compatibility API. If it needs full XPath support, then use the native XPath API.
and as usual, if someone finds a glaring difference between how findall handles a given xpath pattern and how xpath handles it (clarke notation issues aside), it's probably a bug in ET.
this is a bug in ET: In [1]: import elementtree.ElementTree as et In [2]: a = et.Element('a') In [3]: b = et.Element('b') In [4]: a.append(b) In [5]: tree = et.ElementTree(a) In [6]: tree.find('/a') # should be <Element a ...> In [7]: tree.find('/b') # should be None Out[7]: <Element b at -488ee3f4>