]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101100: Fix broken reference `__format__` in `string.rst` (#103531)
authoryuki <drsuaimqjgar@gmail.com>
Tue, 18 Apr 2023 11:18:53 +0000 (20:18 +0900)
committerGitHub <noreply@github.com>
Tue, 18 Apr 2023 11:18:53 +0000 (16:48 +0530)
Doc/library/string.rst

index f55074cc5827184d8f26c5c50e9e1f313ed13cba..26b3f5000634f51be112c65ca9468eaceb16067e 100644 (file)
@@ -254,10 +254,10 @@ Some simple format string examples::
    "Units destroyed: {players[0]}"   # First element of keyword argument 'players'.
 
 The *conversion* field causes a type coercion before formatting.  Normally, the
-job of formatting a value is done by the :meth:`__format__` method of the value
+job of formatting a value is done by the :meth:`~object.__format__` method of the value
 itself.  However, in some cases it is desirable to force a type to be formatted
 as a string, overriding its own definition of formatting.  By converting the
-value to a string before calling :meth:`__format__`, the normal formatting logic
+value to a string before calling :meth:`~object.__format__`, the normal formatting logic
 is bypassed.
 
 Three conversion flags are currently supported: ``'!s'`` which calls :func:`str`