[Python-checkins] cpython: Clarify the documentation of XMLParser.close

eli.bendersky python-checkins at python.org
Sun Aug 25 00:11:49 CEST 2013


http://hg.python.org/cpython/rev/479fdf4fe266
changeset:   85370:479fdf4fe266
user:        Eli Bendersky <eliben at gmail.com>
date:        Sat Aug 24 15:11:44 2013 -0700
summary:
  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.

files:
  Doc/library/xml.etree.elementtree.rst |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -982,7 +982,9 @@
 
    .. 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)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list