Skip to content

Commit b521efb

Browse files
committed
Fix backticks:
1 parent c86a57e commit b521efb

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/library/fractions.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ another rational number, or from a string.
103103

104104
.. versionchanged:: 3.12
105105
:class:`Fraction` instances now support float-style formatting, with
106-
presentation types `"e"`, `"E"`, `"f"`, `"F"`, `"g"`, `"G"` and `"%""`.
106+
presentation types ``"e"``, ``"E"``, ``"f"``, ``"F"``, ``"g"``, ``"G"``
107+
and ``"%""``.
107108

108109
.. attribute:: numerator
109110

@@ -196,12 +197,12 @@ another rational number, or from a string.
196197
This method provides support for float-style formatting of
197198
:class:`Fraction` instances via the :meth:`str.format` method, the
198199
:func:`format` built-in function, or :ref:`Formatted string literals
199-
<f-strings>`. The presentation types `"e"`, `"E"`, `"f"`, `"F"`, `"g"`,
200-
`"G"`` and `"%"` are supported. For these presentation types, formatting
201-
for a :class:`Fraction` object `x` behaves as though the object `x` were
202-
first converted to :class:`float` and then formatted using the float
203-
formatting rules, but avoids the loss of precision that might arise as
204-
a result of that conversion.
200+
<f-strings>`. The presentation types ``"e"``, ``"E"``, ``"f"``, ``"F"``,
201+
``"g"``, ``"G"`` and ``"%"`` are supported. For these presentation types,
202+
formatting for a :class:`Fraction` object `x` behaves as though the
203+
object `x` were first converted to :class:`float` and then formatted
204+
using the float formatting rules, but avoids the loss of precision that
205+
might arise as a result of that conversion.
205206

206207
Here are some examples::
207208

0 commit comments

Comments
 (0)