Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <old-string-formatting>`.

In most of the cases the syntax is similar to the old ``%``-formatting, with the
addition of the ``{}`` and with ``:`` used instead of ``%``.
Expand Down
Loading