]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 22 Feb 2019 00:45:31 +0000 (16:45 -0800)
committerGitHub <noreply@github.com>
Fri, 22 Feb 2019 00:45:31 +0000 (16:45 -0800)
(cherry picked from commit e5458bdb6af81f9b98acecd8819c60016d3f1441)

Co-authored-by: Manjusaka <lizheao940510@gmail.com>
Doc/library/xml.etree.elementtree.rst

index 6298f1396ae294de94c8ab45d11f5c51f46deb78..5f799aba994d709fa4fd1e6ca68b95cebec3309d 100644 (file)
@@ -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)