Skip to content

Commit f601a20

Browse files
Rename document() to get_document_children() in the documentation
1 parent a5c2b17 commit f601a20

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/xml.etree.elementtree.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ TreeBuilder Objects
13621362
Adds text to the current element. *data* is a string.
13631363

13641364

1365-
.. method:: document()
1365+
.. method:: get_document_children()
13661366

13671367
Returns the children of the document:
13681368
the root element, and the comments and processing instructions

Doc/whatsnew/3.16.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ xml
660660
:attr:`~xml.etree.ElementTree.ElementTree.children` attribute,
661661
a sequence of the children of the document,
662662
and :class:`~xml.etree.ElementTree.TreeBuilder` returns them
663-
from the new :meth:`!document` method
663+
from the new :meth:`!get_document_children` method
664664
when *insert_comments* or *insert_pis* is true.
665665
(Contributed by Serhiy Storchaka in :gh:`68475`.)
666666

Misc/NEWS.d/next/Library/2026-08-31-12-00-00.gh-issue-68475.Nq7Vt2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ the root element and the comments and processing instructions around it.
55
When *insert_comments* or *insert_pis* is true,
66
:class:`~xml.etree.ElementTree.TreeBuilder` no longer discards comments
77
and processing instructions which occur outside of the root element;
8-
they are returned by the new :meth:`!document` method
8+
they are returned by the new :meth:`!get_document_children` method
99
and are used by :func:`~xml.etree.ElementTree.parse`.

0 commit comments

Comments
 (0)