From 216e909fcb5fee02867924bd24bac69682df47f9 Mon Sep 17 00:00:00 2001 From: Bayel1602 Date: Wed, 4 Nov 2026 22:46:57 +0600 Subject: [PATCH 1/2] gh-161311: Document inherited abstract methods in `collections.abc` (GH-161319) (cherry picked from commit 1dd8e71354a07ec0d82d0f5d042e0470e9953346) Co-authored-by: Bayel1602 --- Doc/library/collections.abc.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 10e3790717ed6ed..b897266d5992838 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -111,6 +111,9 @@ Collections Abstract Base Classes The collections module offers the following :term:`ABCs `: +The "Abstract Methods" column lists all required abstract methods, +including those inherited from parent classes. + .. tabularcolumns:: |l|L|L|L| ============================== ====================== ======================= ==================================================== @@ -120,7 +123,8 @@ ABC Inherits from Abstract Methods Mi :class:`Hashable` [1]_ ``__hash__`` :class:`Iterable` [1]_ [2]_ ``__iter__`` :class:`Iterator` [1]_ :class:`Iterable` ``__next__`` ``__iter__`` -:class:`Reversible` [1]_ :class:`Iterable` ``__reversed__`` +:class:`Reversible` [1]_ :class:`Iterable` ``__iter__``, + ``__reversed__`` :class:`Generator` [1]_ :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__`` :class:`Sized` [1]_ ``__len__`` :class:`Callable` [1]_ ``__call__`` @@ -170,7 +174,8 @@ ABC Inherits from Abstract Methods Mi :class:`ValuesView` :class:`MappingView`, ``__contains__``, ``__iter__`` :class:`Collection` :class:`Awaitable` [1]_ ``__await__`` -:class:`Coroutine` [1]_ :class:`Awaitable` ``send``, ``throw`` ``close`` +:class:`Coroutine` [1]_ :class:`Awaitable` ``__await__``, ``close`` + ``send``, ``throw`` :class:`AsyncIterable` [1]_ ``__aiter__`` :class:`AsyncIterator` [1]_ :class:`AsyncIterable` ``__anext__`` ``__aiter__`` :class:`AsyncGenerator` [1]_ :class:`AsyncIterator` ``asend``, ``athrow`` ``aclose``, ``__aiter__``, ``__anext__`` From ed2ddc3cf1d4546e7c7d0a3d33e65b85d4d43d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Wed, 4 Nov 2026 17:55:00 +0100 Subject: [PATCH 2/2] Update collections.abc.rst --- Doc/library/collections.abc.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index b897266d5992838..ded557f54457e6d 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -109,10 +109,9 @@ of three ways. Collections Abstract Base Classes --------------------------------- -The collections module offers the following :term:`ABCs `: - -The "Abstract Methods" column lists all required abstract methods, -including those inherited from parent classes. +The collections module offers the following :term:`ABCs `, +where the "Abstract Methods" column lists all required abstract methods, +including those inherited from parent classes: .. tabularcolumns:: |l|L|L|L|