Skip to content

Commit b046f1b

Browse files
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (pythonGH-11903)
(cherry picked from commit e5458bd) Co-authored-by: Manjusaka <[email protected]>
1 parent 7121a6e commit b046f1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/xml.etree.elementtree.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,12 @@ Functions
490490
*elem* is an element tree or an individual element.
491491

492492

493-
.. function:: fromstring(text)
493+
.. function:: fromstring(text, parser=None)
494494

495495
Parses an XML section from a string constant. Same as :func:`XML`. *text*
496-
is a string containing XML data. Returns an :class:`Element` instance.
496+
is a string containing XML data. *parser* is an optional parser instance.
497+
If not given, the standard :class:`XMLParser` parser is used.
498+
Returns an :class:`Element` instance.
497499

498500

499501
.. function:: fromstringlist(sequence, parser=None)

0 commit comments

Comments
 (0)