[Python-checkins] cpython (merge 3.3 -> default): Merge 3.3
eli.bendersky
python-checkins at python.org
Tue Oct 9 16:19:23 CEST 2012
http://hg.python.org/cpython/rev/6e407fcf7380
changeset: 79624:6e407fcf7380
parent: 79622:5cb3c08997e6
parent: 79623:ff925e135e60
user: Eli Bendersky <eliben at gmail.com>
date: Tue Oct 09 07:19:13 2012 -0700
summary:
Merge 3.3
Closes #16082: clarify the documentation of tostring[list] saying that it may generate a bytestring, depending on the given encoding.
files:
Doc/library/xml.etree.elementtree.rst | 16 +++++++-------
1 files changed, 8 insertions(+), 8 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
@@ -433,9 +433,9 @@
Generates a string representation of an XML element, including all
subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is
the output encoding (default is US-ASCII). Use ``encoding="unicode"`` to
- generate a Unicode string. *method* is either ``"xml"``,
- ``"html"`` or ``"text"`` (default is ``"xml"``). Returns an (optionally)
- encoded string containing the XML data.
+ generate a Unicode string (otherwise, a bytestring is generated). *method*
+ is either ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).
+ Returns an (optionally) encoded string containing the XML data.
.. function:: tostringlist(element, encoding="us-ascii", method="xml")
@@ -443,11 +443,11 @@
Generates a string representation of an XML element, including all
subelements. *element* is an :class:`Element` instance. *encoding* [1]_ is
the output encoding (default is US-ASCII). Use ``encoding="unicode"`` to
- generate a Unicode string. *method* is either ``"xml"``,
- ``"html"`` or ``"text"`` (default is ``"xml"``). Returns a list of
- (optionally) encoded strings containing the XML data. It does not guarantee
- any specific sequence, except that ``"".join(tostringlist(element)) ==
- tostring(element)``.
+ generate a Unicode string (otherwise, a bytestring is generated). *method*
+ is either ``"xml"``, ``"html"`` or ``"text"`` (default is ``"xml"``).
+ Returns a list of (optionally) encoded strings containing the XML data.
+ It does not guarantee any specific sequence, except that
+ ``"".join(tostringlist(element)) == tostring(element)``.
.. versionadded:: 3.2
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list