summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-03-12 13:01:22 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-03-12 13:01:22 (GMT)
commit7343cb0790d3ac722ee788d5c2044cbda770a140 (patch)
tree94bee85a0f8bd65b276b288d575f4d13c870ba9f /Doc
parentc30b7b16ea03ad094917615940cd1a9ef53c4904 (diff)
downloadcpython-7343cb0790d3ac722ee788d5c2044cbda770a140.zip
cpython-7343cb0790d3ac722ee788d5c2044cbda770a140.tar.gz
cpython-7343cb0790d3ac722ee788d5c2044cbda770a140.tar.bz2
Issue #11367: fix documentation of some find* methods in ElementTree
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/xml.etree.elementtree.rst15
1 files changed, 3 insertions, 12 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index d320711..cf0c33f 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -412,26 +412,17 @@ ElementTree Objects
.. method:: find(match)
- Finds the first toplevel element matching *match*. *match* may be a tag
- name or path. Same as getroot().find(match). Returns the first matching
- element, or ``None`` if no element was found.
+ Same as :meth:`Element.find`, starting at the root of the tree.
.. method:: findall(match)
- Finds all matching subelements, by tag name or path. Same as
- getroot().findall(match). *match* may be a tag name or path. Returns a
- list containing all matching elements, in document order.
+ Same as :meth:`Element.findall`, starting at the root of the tree.
.. method:: findtext(match, default=None)
- Finds the element text for the first toplevel element with given tag.
- Same as getroot().findtext(match). *match* may be a tag name or path.
- *default* is the value to return if the element was not found. Returns
- the text content of the first matching element, or the default value no
- element was found. Note that if the element is found, but has no text
- content, this method returns an empty string.
+ Same as :meth:`Element.findtext`, starting at the root of the tree.
.. method:: getiterator(tag=None)