Docs: Fix broken reference `__getitem__` in `string.rst` (#103371)

This commit is contained in:
yuki 2023-04-09 11:02:16 +09:00 committed by GitHub
parent 63dc969ec6
commit 83af8f2686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ dictionary keys (e.g., the strings ``'10'`` or ``':-]'``) within a format string
The *arg_name* can be followed by any number of index or
attribute expressions. An expression of the form ``'.name'`` selects the named
attribute using :func:`getattr`, while an expression of the form ``'[index]'``
does an index lookup using :func:`__getitem__`.
does an index lookup using :meth:`~object.__getitem__`.
.. versionchanged:: 3.1
The positional argument specifiers can be omitted for :meth:`str.format`,