summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManjusaka <lizheao940510@gmail.com>2019-02-22 00:33:57 (GMT)
committerCheryl Sabella <cheryl.sabella@gmail.com>2019-02-22 00:33:57 (GMT)
commite5458bdb6af81f9b98acecd8819c60016d3f1441 (patch)
tree8388af1a84050188de0d3162972647595e0bcf9b
parent47d9987247bcc45983a6d51fd1ae46d5d356d0f8 (diff)
downloadcpython-e5458bdb6af81f9b98acecd8819c60016d3f1441.zip
cpython-e5458bdb6af81f9b98acecd8819c60016d3f1441.tar.gz
cpython-e5458bdb6af81f9b98acecd8819c60016d3f1441.tar.bz2
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)
-rw-r--r--Doc/library/xml.etree.elementtree.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index aae8014..4a7cf6f 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)