From bfd78370a59863e0f1715d122cc1e4b26101028e Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sat, 24 Aug 2013 15:11:44 -0700 Subject: [PATCH] Clarify the documentation of XMLParser.close The return value of close() is not always a toplevel element. It depends on what the underlying target returns. By default, TreeBuilder returns the toplevel document element. --- Doc/library/xml.etree.elementtree.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index c0cc683068..6bafbe7082 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -982,7 +982,9 @@ XMLParser Objects .. method:: close() - Finishes feeding data to the parser. Returns an element structure. + Finishes feeding data to the parser. Returns the result of calling the + `close` method of the *target* passed during construction; by default, + this is the toplevel document element. .. method:: doctype(name, pubid, system) -- 2.40.0