diff options
author | Eli Bendersky <eliben@gmail.com> | 2012-10-09 13:47:23 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2012-10-09 13:47:23 (GMT) |
commit | b8d8d584f7723291546916caf751293b7fdabb98 (patch) | |
tree | 2a40db5bfd291e547d1a4d7a50e73853da5043f8 /Doc | |
parent | 934f56335312da12cb21d66a16c6cf6e664c4a03 (diff) | |
parent | 323a43af0639883220227424e6aee474bfde55f7 (diff) | |
download | cpython-b8d8d584f7723291546916caf751293b7fdabb98.zip cpython-b8d8d584f7723291546916caf751293b7fdabb98.tar.gz cpython-b8d8d584f7723291546916caf751293b7fdabb98.tar.bz2 |
Merge 3.3
Issue #12322: clarify xpath reference for cases where the path reaches ancestors of the start element. Also add missing markup for a None. Thanks to patrick vrijlandt and Mike Hoy for the report and initial patches.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 16bb00c..cd4a490 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -291,7 +291,9 @@ Supported XPath syntax | | current element. For example, ``.//egg`` selects | | | all ``egg`` elements in the entire tree. | +-----------------------+------------------------------------------------------+ -| ``..`` | Selects the parent element. | +| ``..`` | Selects the parent element. Returns ``None`` if the | +| | path attempts to reach the ancestors of the start | +| | element (the element ``find`` was called on). | +-----------------------+------------------------------------------------------+ | ``[@attrib]`` | Selects all elements that have the given attribute. | +-----------------------+------------------------------------------------------+ @@ -521,7 +523,7 @@ Element Objects .. method:: clear() Resets an element. This function removes all subelements, clears all - attributes, and sets the text and tail attributes to None. + attributes, and sets the text and tail attributes to ``None``. .. method:: get(key, default=None) |