Skip to content

Commit dba777c

Browse files
committed
gh-101549: fix documentation of xml.etree.ElementInclude
fixed wrong type in default_loader description. fixed description of the include method.
1 parent d4c410f commit dba777c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Doc/library/xml.etree.elementtree.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -825,19 +825,19 @@ Reference
825825
Functions
826826
^^^^^^^^^
827827

828-
.. function:: xml.etree.ElementInclude.default_loader( href, parse, encoding=None)
828+
.. function:: xml.etree.ElementInclude.default_loader(href, parse, encoding=None)
829829
:module:
830830

831-
Default loader. This default loader reads an included resource from disk. *href* is a URL.
831+
Default loader. This default loader reads an included resource from disk. *href* is an URL.
832832
*parse* is for parse mode either "xml" or "text". *encoding*
833833
is an optional text encoding. If not given, encoding is ``utf-8``. Returns the
834-
expanded resource. If the parse mode is ``"xml"``, this is an ElementTree
834+
expanded resource. If the parse mode is ``"xml"``, this is an Element
835835
instance. If the parse mode is "text", this is a Unicode string. If the
836836
loader fails, it can return None or raise an exception.
837837

838838

839-
.. function:: xml.etree.ElementInclude.include( elem, loader=None, base_url=None, \
840-
max_depth=6)
839+
.. function:: xml.etree.ElementInclude.include(elem, loader=None, base_url=None, \
840+
max_depth=6)
841841
:module:
842842

843843
This function expands XInclude directives. *elem* is the root element. *loader* is
@@ -848,10 +848,7 @@ Functions
848848
inclusions. Limited to reduce the risk of malicious content explosion. Pass a
849849
negative value to disable the limitation.
850850

851-
Returns the expanded resource. If the parse mode is
852-
``"xml"``, this is an ElementTree instance. If the parse mode is "text",
853-
this is a Unicode string. If the loader fails, it can return None or
854-
raise an exception.
851+
Returns the expanded resource in *elem*.
855852

856853
.. versionadded:: 3.9
857854
The *base_url* and *max_depth* parameters.

0 commit comments

Comments
 (0)