From 40f08c180ec9f2c3b70c2fd169559e1de0f09951 Mon Sep 17 00:00:00 2001 From: Bayel1602 Date: Wed, 4 Nov 2026 21:06:12 +0600 Subject: [PATCH 1/3] gh-161311: Document inherited abstract methods in collections.abc --- Doc/library/collections.abc.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 10e3790717ed6e..78d2dfed1eb61f 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -120,7 +120,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 +171,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 a83306624144a4403875d3c6082e01b1c234fa50 Mon Sep 17 00:00:00 2001 From: Bayel1602 Date: Wed, 4 Nov 2026 21:52:51 +0600 Subject: [PATCH 2/3] gh-161311: Clarify abstract methods column header --- Doc/library/collections.abc.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index 78d2dfed1eb61f..fd7ec91223cf65 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -115,6 +115,7 @@ The collections module offers the following :term:`ABCs `: ============================== ====================== ======================= ==================================================== ABC Inherits from Abstract Methods Mixin Methods + (including inherited) ============================== ====================== ======================= ==================================================== :class:`Container` [1]_ ``__contains__`` :class:`Hashable` [1]_ ``__hash__`` From 55b4dd7c47d4fe55deccf0af318c76568016553a Mon Sep 17 00:00:00 2001 From: Bayel1602 Date: Wed, 4 Nov 2026 22:20:11 +0600 Subject: [PATCH 3/3] gh-161311: Move abstract methods clarification to introductory text Added a note about the 'Abstract Methods' column in the collections ABCs documentation. --- Doc/library/collections.abc.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index fd7ec91223cf65..b897266d599283 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -111,11 +111,13 @@ 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| ============================== ====================== ======================= ==================================================== ABC Inherits from Abstract Methods Mixin Methods - (including inherited) ============================== ====================== ======================= ==================================================== :class:`Container` [1]_ ``__contains__`` :class:`Hashable` [1]_ ``__hash__``