[Python-checkins] bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)

Miss Islington (bot) webhook-mailer at python.org
Thu Feb 21 19:45:35 EST 2019

commit: b046f1badaaffb7e526b937fa2192c449b9076ed
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-02-21T16:45:31-08:00

bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)

(cherry picked from commit e5458bdb6af81f9b98acecd8819c60016d3f1441)

Co-authored-by: Manjusaka <lizheao940510 at gmail.com>

M Doc/library/xml.etree.elementtree.rst

diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index 6298f1396ae2..5f799aba994d 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -490,10 +490,12 @@ Functions
    *elem* is an element tree or an individual element.
-.. function:: fromstring(text)
+.. function:: fromstring(text, parser=None)
    Parses an XML section from a string constant.  Same as :func:`XML`.  *text*
-   is a string containing XML data.  Returns an :class:`Element` instance.
+   is a string containing XML data.  *parser* is an optional parser instance.
+   If not given, the standard :class:`XMLParser` parser is used.
+   Returns an :class:`Element` instance.
 .. function:: fromstringlist(sequence, parser=None)

More information about the Python-checkins mailing list