Eli Bendersky added the comment:

I think this may be intentional. Absolute searches on a ElementTree are 
discouraged with a warning:

    def find(self, path, namespaces=None):
        # assert self._root is not None
        if path[:1] == "/":
            path = "." + path
            warnings.warn(
                "This search is broken in 1.3 and earlier, and will be "
                "fixed in a future version.  If you rely on the current "
                "behaviour, change it to %r" % path,
                FutureWarning, stacklevel=2
                )
        return self._root.find(path, namespaces)

See what happens when an "absolute path" is attemped? The code just hacks it 
into a relative path and prints a menacing warning.

So, I would not change the documentation at this point. However, the problem 
should go away if and when the XPath support is improved to really support 
absolute paths.

----------
resolution:  -> wont fix
stage: needs patch -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12321>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to