Skip to content

Commit 7a5cbc7

Browse files
bpo-39937: Improve suggestions for removal of getchildren and getiterator in changelog (GH-18937)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent c7ad974 commit 7a5cbc7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎Doc/whatsnew/3.9.rst‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,13 @@ Removed
605605
Use :meth:`~threading.Thread.is_alive()` instead.
606606
(Contributed by Dong-hee Na in :issue:`37804`.)
607607

608-
* Methods ``getchildren()`` and ``getiterator()`` in the
609-
:mod:`~xml.etree.ElementTree` module have been removed. They were
610-
deprecated in Python 3.2. Use functions :func:`list` and :func:`iter`
611-
instead. The ``xml.etree.cElementTree`` module has been removed.
608+
* Methods ``getchildren()`` and ``getiterator()`` of classes
609+
:class:`~xml.etree.ElementTree.ElementTree` and
610+
:class:`~xml.etree.ElementTree.Element` in the :mod:`~xml.etree.ElementTree`
611+
module have been removed. They were deprecated in Python 3.2.
612+
Use ``iter(x)`` or ``list(x)`` instead of ``x.getchildren()`` and
613+
``x.iter()`` or ``list(x.iter())`` instead of ``x.getiterator()``.
614+
The ``xml.etree.cElementTree`` module has been removed.
612615
(Contributed by Serhiy Storchaka in :issue:`36543`.)
613616

614617
* The old :mod:`plistlib` API has been removed, it was deprecated since Python

0 commit comments

Comments
 (0)