GH-101100: Fix reference warnings for `__getitem__` (#110118)

This commit is contained in:
Adam Turner 2023-10-19 16:05:05 +01:00 committed by GitHub
parent d144749914
commit da99133710
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 38 additions and 38 deletions

View file

@ -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: