From e5458bdb6af81f9b98acecd8819c60016d3f1441 Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Fri, 22 Feb 2019 08:33:57 +0800 Subject: [PATCH] bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903) --- Doc/library/xml.etree.elementtree.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index aae8014037..4a7cf6f095 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -494,10 +494,12 @@ Functions by the user. -.. 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) -- 2.40.0