summaryrefslogtreecommitdiffstats
path: root/Doc/library/operator.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/operator.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/operator.rst')
-rw-r--r--Doc/library/operator.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst
index 57c67bc..96f2c28 100644
--- a/Doc/library/operator.rst
+++ b/Doc/library/operator.rst
@@ -306,7 +306,7 @@ expect a function argument.
itemgetter(*items)
Return a callable object that fetches *item* from its operand using the
- operand's :meth:`__getitem__` method. If multiple items are specified,
+ operand's :meth:`~object.__getitem__` method. If multiple items are specified,
returns a tuple of lookup values. For example:
* After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``.
@@ -326,7 +326,7 @@ expect a function argument.
return tuple(obj[item] for item in items)
return g
- The items can be any type accepted by the operand's :meth:`__getitem__`
+ The items can be any type accepted by the operand's :meth:`~object.__getitem__`
method. Dictionaries accept any :term:`hashable` value. Lists, tuples, and
strings accept an index or a slice: