mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Issue #11367: fix documentation of some find* methods in ElementTree
This commit is contained in:
commit
72cdb5c39e
2 changed files with 5 additions and 7 deletions
|
|
@ -692,8 +692,7 @@ def getiterator(self, tag=None):
|
|||
return list(self.iter(tag))
|
||||
|
||||
##
|
||||
# Finds the first toplevel element with given tag.
|
||||
# Same as getroot().find(path).
|
||||
# Same as getroot().find(path), starting at the root of the tree.
|
||||
#
|
||||
# @param path What element to look for.
|
||||
# @keyparam namespaces Optional namespace prefix map.
|
||||
|
|
@ -713,10 +712,9 @@ def find(self, path, namespaces=None):
|
|||
return self._root.find(path, namespaces)
|
||||
|
||||
##
|
||||
# Finds the element text for the first toplevel element with given
|
||||
# tag. Same as getroot().findtext(path).
|
||||
# Same as getroot().findtext(path), starting at the root of the tree.
|
||||
#
|
||||
# @param path What toplevel element to look for.
|
||||
# @param path What element to look for.
|
||||
# @param default What to return if the element was not found.
|
||||
# @keyparam namespaces Optional namespace prefix map.
|
||||
# @return The text content of the first matching element, or the
|
||||
|
|
@ -738,8 +736,7 @@ def findtext(self, path, default=None, namespaces=None):
|
|||
return self._root.findtext(path, default, namespaces)
|
||||
|
||||
##
|
||||
# Finds all toplevel elements with the given tag.
|
||||
# Same as getroot().findall(path).
|
||||
# Same as getroot().findall(path), starting at the root of the tree.
|
||||
#
|
||||
# @param path What element to look for.
|
||||
# @keyparam namespaces Optional namespace prefix map.
|
||||
|
|
|
|||
|
|
@ -480,6 +480,7 @@ Janko Hauser
|
|||
Rycharde Hawkes
|
||||
Ben Hayden
|
||||
Jochen Hayek
|
||||
Henrik Heimbuerger
|
||||
Christian Heimes
|
||||
Thomas Heller
|
||||
Malte Helmert
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue