Skip to content

Commit

Permalink
gh-123560: Correct docs for "empty" format type for floats (#123561)
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev authored Sep 26, 2024
1 parent 19fed6c commit 274d9ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,13 @@ The available presentation types for :class:`float` and
| ``'%'`` | Percentage. Multiplies the number by 100 and displays |
| | in fixed (``'f'``) format, followed by a percent sign. |
+---------+----------------------------------------------------------+
| None | For :class:`float` this is the same as ``'g'``, except |
| None | For :class:`float` this is like the ``'g'`` type, except |
| | that when fixed-point notation is used to format the |
| | result, it always includes at least one digit past the |
| | decimal point. The precision used is as large as needed |
| | to represent the given value faithfully. |
| | decimal point, and switches to the scientific notation |
| | when ``exp >= p - 1``. When the precision is not |
| | specified, the latter will be as large as needed to |
| | represent the given value faithfully. |
| | |
| | For :class:`~decimal.Decimal`, this is the same as |
| | either ``'g'`` or ``'G'`` depending on the value of |
Expand Down

0 comments on commit 274d9ab

Please sign in to comment.