]> granicus.if.org Git - python/commitdiff
Clarify the documentation of XMLParser.close
authorEli Bendersky <eliben@gmail.com>
Sat, 24 Aug 2013 22:11:44 +0000 (15:11 -0700)
committerEli Bendersky <eliben@gmail.com>
Sat, 24 Aug 2013 22:11:44 +0000 (15:11 -0700)
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

index c0cc683068a7b6dfa46ebaae68dbddf0c17c41ea..6bafbe708257473dae4ed9af71d0f5fb8c6c97c2 100644 (file)
@@ -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)