homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients eli.bendersky, flox, patrick.vrijlandt, terry.reedy
Date 2012年10月14日.13:30:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350221451.23.0.0474957560121.issue12321@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012年10月14日 13:30:51eli.benderskysetrecipients: + eli.bendersky, terry.reedy, flox, patrick.vrijlandt
2012年10月14日 13:30:51eli.benderskysetmessageid: <1350221451.23.0.0474957560121.issue12321@psf.upfronthosting.co.za>
2012年10月14日 13:30:51eli.benderskylinkissue12321 messages
2012年10月14日 13:30:50eli.benderskycreate

AltStyle によって変換されたページ (->オリジナル) /