Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 72cdb5c

Browse files
committed
Issue #11367: fix documentation of some find* methods in ElementTree
2 parents 0fb37ea + 7343cb0 commit 72cdb5c

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Lib/xml/etree/ElementTree.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ def getiterator(self, tag=None):
692692
return list(self.iter(tag))
693693

694694
##
695-
# Finds the first toplevel element with given tag.
696-
# Same as getroot().find(path).
695+
# Same as getroot().find(path), starting at the root of the tree.
697696
#
698697
# @param path What element to look for.
699698
# @keyparam namespaces Optional namespace prefix map.
@@ -713,10 +712,9 @@ def find(self, path, namespaces=None):
713712
return self._root.find(path, namespaces)
714713

715714
##
716-
# Finds the element text for the first toplevel element with given
717-
# tag. Same as getroot().findtext(path).
715+
# Same as getroot().findtext(path), starting at the root of the tree.
718716
#
719-
# @param path What toplevel element to look for.
717+
# @param path What element to look for.
720718
# @param default What to return if the element was not found.
721719
# @keyparam namespaces Optional namespace prefix map.
722720
# @return The text content of the first matching element, or the
@@ -738,8 +736,7 @@ def findtext(self, path, default=None, namespaces=None):
738736
return self._root.findtext(path, default, namespaces)
739737

740738
##
741-
# Finds all toplevel elements with the given tag.
742-
# Same as getroot().findall(path).
739+
# Same as getroot().findall(path), starting at the root of the tree.
743740
#
744741
# @param path What element to look for.
745742
# @keyparam namespaces Optional namespace prefix map.

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ Janko Hauser
480480
Rycharde Hawkes
481481
Ben Hayden
482482
Jochen Hayek
483+
Henrik Heimbuerger
483484
Christian Heimes
484485
Thomas Heller
485486
Malte Helmert

0 commit comments

Comments
 (0)