diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 8b896011734df5..51574fcbcb9863 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2944,6 +2944,12 @@ The conversion types are: | | character in the result. | | +------------+-----------------------------------------------------+-------+ +For a general non-string Python object ``obj``, numeric conversion types +attempt to format values, converted first to built-in :class:`float` (by +``float(obj)``, for floating-point formats) and :class:`int` (by +``operator.index(obj)`` for ``'o'``, ``'x'``, ``'X'`` or ``'c'`` formats, or by +``int(obj)`` for other integer formats) types. + Notes: (1) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 58c836c7382330..d25705ba0ed8d1 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -645,7 +645,7 @@ Format examples ^^^^^^^^^^^^^^^ This section contains examples of the :meth:`str.format` syntax and -comparison with the old ``%``-formatting. +comparison with the old :ref:`printf-style formatting `. In most of the cases the syntax is similar to the old ``%``-formatting, with the addition of the ``{}`` and with ``:`` used instead of ``%``.