We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
__format__
string.rst
1 parentece20db commitc3d015cCopy full SHA for c3d015c
Doc/library/string.rst
@@ -254,10 +254,10 @@ Some simple format string examples::
254
"Units destroyed: {players[0]}" # First element of keyword argument 'players'.
255
256
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
+job of formatting a value is done by the:meth:`~object.__format__` method of the value
258
itself. However, in some cases it is desirable to force a type to be formatted
259
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
+value to a string before calling:meth:`~object.__format__`, the normal formatting logic
261
is bypassed.
262
263
Three conversion flags are currently supported: ``'!s'`` which calls:func:`str`