[Python-checkins] bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718)

Stefan Behnel webhook-mailer at python.org
Sat Jun 1 02:58:58 EDT 2019


https://github.com/python/cpython/commit/18e23f227be59241cbb1eeb6d6669771dd7275fb
commit: 18e23f227be59241cbb1eeb6d6669771dd7275fb
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Stefan Behnel <stefan_ml at behnel.de>
date: 2019-06-01T08:58:54+02:00
summary:

bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718)

(cherry picked from commit 5ac0b988fd5f1428efe35329c531c7b5c74d37f6)

Co-authored-by: Windson yang <wiwindson at outlook.com>

files:
M Doc/library/xml.dom.minidom.rst

diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
index 96080c3e318c..c68b0371af70 100644
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -134,11 +134,12 @@ module documentation.  This section lists the differences between the API and
 
 .. method:: Node.writexml(writer, indent="", addindent="", newl="")
 
-   Write XML to the writer object.  The writer should have a :meth:`write` method
-   which matches that of the file object interface.  The *indent* parameter is the
-   indentation of the current node.  The *addindent* parameter is the incremental
-   indentation to use for subnodes of the current one.  The *newl* parameter
-   specifies the string to use to terminate newlines.
+   Write XML to the writer object.  The writer receives texts but not bytes as input,
+   it should have a :meth:`write` method which matches that of the file object
+   interface.  The *indent* parameter is the indentation of the current node.
+   The *addindent* parameter is the incremental indentation to use for subnodes
+   of the current one.  The *newl* parameter specifies the string to use to
+   terminate newlines.
 
    For the :class:`Document` node, an additional keyword argument *encoding* can
    be used to specify the encoding field of the XML header.



More information about the Python-checkins mailing list