summaryrefslogtreecommitdiffstats
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authoryuki <drsuaimqjgar@gmail.com>2023-04-18 11:18:53 (GMT)
committerGitHub <noreply@github.com>2023-04-18 11:18:53 (GMT)
commitc3d015ce62f791e703bfcabb0907cfeefac768a9 (patch)
tree2b62a3a533113d61c52ee4da6b8bd56178e69236 /Doc/library/string.rst
parentece20dba120a1a4745721c49f8d7389d4b1ee2a7 (diff)
downloadcpython-c3d015ce62f791e703bfcabb0907cfeefac768a9.zip
cpython-c3d015ce62f791e703bfcabb0907cfeefac768a9.tar.gz
cpython-c3d015ce62f791e703bfcabb0907cfeefac768a9.tar.bz2
gh-101100: Fix broken reference `__format__` in `string.rst` (#103531)
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r--Doc/library/string.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index f55074c..26b3f50 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -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`