Skip to content

Commit c3d015c

Browse files
authored
gh-101100: Fix broken reference __format__ in string.rst (#103531)
1 parent ece20db commit c3d015c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/string.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ Some simple format string examples::
254254
"Units destroyed: {players[0]}" # First element of keyword argument 'players'.
255255

256256
The *conversion* field causes a type coercion before formatting. Normally, the
257-
job of formatting a value is done by the :meth:`__format__` method of the value
257+
job of formatting a value is done by the :meth:`~object.__format__` method of the value
258258
itself. However, in some cases it is desirable to force a type to be formatted
259259
as a string, overriding its own definition of formatting. By converting the
260-
value to a string before calling :meth:`__format__`, the normal formatting logic
260+
value to a string before calling :meth:`~object.__format__`, the normal formatting logic
261261
is bypassed.
262262

263263
Three conversion flags are currently supported: ``'!s'`` which calls :func:`str`

0 commit comments

Comments
 (0)