[Python-checkins] gh-101100: Fix broken reference `__format__` in `string.rst` (#103531)

kumaraditya303 webhook-mailer at python.org
Tue Apr 18 07:19:06 EDT 2023


https://github.com/python/cpython/commit/c3d015ce62f791e703bfcabb0907cfeefac768a9
commit: c3d015ce62f791e703bfcabb0907cfeefac768a9
branch: main
author: yuki <drsuaimqjgar at gmail.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2023-04-18T16:48:53+05:30
summary:

gh-101100: Fix broken reference `__format__` in `string.rst` (#103531)

files:
M Doc/library/string.rst

diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index f55074cc5827..26b3f5000634 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`



More information about the Python-checkins mailing list