summaryrefslogtreecommitdiffstats
path: root/Doc/library/collections.abc.rst
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-10-19 15:05:05 (GMT)
committerGitHub <noreply@github.com>2023-10-19 15:05:05 (GMT)
commitda991337105e6d87b85a20fdcb386aa140f94d23 (patch)
treed8be51168734328db76f84c98c5c8adc9902b4bf /Doc/library/collections.abc.rst
parentd144749914dbe295d71d037e8ca695783511123f (diff)
downloadcpython-da991337105e6d87b85a20fdcb386aa140f94d23.zip
cpython-da991337105e6d87b85a20fdcb386aa140f94d23.tar.gz
cpython-da991337105e6d87b85a20fdcb386aa140f94d23.tar.bz2
GH-101100: Fix reference warnings for ``__getitem__`` (#110118)
Diffstat (limited to 'Doc/library/collections.abc.rst')
-rw-r--r--Doc/library/collections.abc.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
index 43a3286..edc0789 100644
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -192,7 +192,7 @@ ABC Inherits from Abstract Methods Mi
.. [2] Checking ``isinstance(obj, Iterable)`` detects classes that are
registered as :class:`Iterable` or that have an :meth:`__iter__`
method, but it does not detect classes that iterate with the
- :meth:`__getitem__` method. The only reliable way to determine
+ :meth:`~object.__getitem__` method. The only reliable way to determine
whether an object is :term:`iterable` is to call ``iter(obj)``.
@@ -222,7 +222,7 @@ Collections Abstract Base Classes -- Detailed Descriptions
Checking ``isinstance(obj, Iterable)`` detects classes that are registered
as :class:`Iterable` or that have an :meth:`__iter__` method, but it does
- not detect classes that iterate with the :meth:`__getitem__` method.
+ not detect classes that iterate with the :meth:`~object.__getitem__` method.
The only reliable way to determine whether an object is :term:`iterable`
is to call ``iter(obj)``.
@@ -262,8 +262,8 @@ Collections Abstract Base Classes -- Detailed Descriptions
Implementation note: Some of the mixin methods, such as
:meth:`__iter__`, :meth:`__reversed__` and :meth:`index`, make
- repeated calls to the underlying :meth:`__getitem__` method.
- Consequently, if :meth:`__getitem__` is implemented with constant
+ repeated calls to the underlying :meth:`~object.__getitem__` method.
+ Consequently, if :meth:`~object.__getitem__` is implemented with constant
access speed, the mixin methods will have linear performance;
however, if the underlying method is linear (as it would be with a
linked list), the mixins will have quadratic performance and will