Skip to content

Commit e5458bd

Browse files
Zheaolicsabella
authored andcommitted
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)
1 parent 47d9987 commit e5458bd

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
@@ -494,10 +494,12 @@ Functions
494494
by the user.
495495

496496

497-
.. function:: fromstring(text)
497+
.. function:: fromstring(text, parser=None)
498498

499499
Parses an XML section from a string constant. Same as :func:`XML`. *text*
500-
is a string containing XML data. Returns an :class:`Element` instance.
500+
is a string containing XML data. *parser* is an optional parser instance.
501+
If not given, the standard :class:`XMLParser` parser is used.
502+
Returns an :class:`Element` instance.
501503

502504

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

0 commit comments

Comments
 (0)