]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)
authorManjusaka <lizheao940510@gmail.com>
Fri, 22 Feb 2019 00:33:57 +0000 (08:33 +0800)
committerCheryl Sabella <cheryl.sabella@gmail.com>
Fri, 22 Feb 2019 00:33:57 +0000 (19:33 -0500)
Doc/library/xml.etree.elementtree.rst

index aae80140374cc1e5db51be585df278d9aba15abe..4a7cf6f095885e168387498b2deeb7843233aaf7 100644 (file)
@@ -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)