]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39937: Improve suggestions for removal of getchildren and getiterator in changelo...
authorRahul Kumaresan <kayrahul@gmail.com>
Sat, 14 Mar 2020 05:50:24 +0000 (11:20 +0530)
committerGitHub <noreply@github.com>
Sat, 14 Mar 2020 05:50:24 +0000 (11:20 +0530)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Doc/whatsnew/3.9.rst

index 4ef82feba19824e258750ee339114bcc79aeeb6a..fc91870739c0989e581ab60f85b68d825758ec22 100644 (file)
@@ -605,10 +605,13 @@ Removed
   Use :meth:`~threading.Thread.is_alive()` instead.
   (Contributed by Dong-hee Na in :issue:`37804`.)
 
-* Methods ``getchildren()`` and ``getiterator()`` in the
-  :mod:`~xml.etree.ElementTree` module have been removed.  They were
-  deprecated in Python 3.2.  Use functions :func:`list` and :func:`iter`
-  instead.  The ``xml.etree.cElementTree`` module has been removed.
+* Methods ``getchildren()`` and ``getiterator()`` of classes
+  :class:`~xml.etree.ElementTree.ElementTree` and
+  :class:`~xml.etree.ElementTree.Element` in the :mod:`~xml.etree.ElementTree`
+  module have been removed.  They were deprecated in Python 3.2.
+  Use ``iter(x)`` or ``list(x)`` instead of ``x.getchildren()`` and
+  ``x.iter()`` or ``list(x.iter())`` instead of ``x.getiterator()``.
+  The ``xml.etree.cElementTree`` module has been removed.
   (Contributed by Serhiy Storchaka in :issue:`36543`.)
 
 * The old :mod:`plistlib` API has been removed, it was deprecated since Python