https://github.com/python/cpython/commit/42432e5254d16287f50e133878eb18ca024e0a46
commit: 42432e5254d16287f50e133878eb18ca024e0a46
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2024-09-26T12:53:58Z
summary:

[3.12] gh-123560: Correct docs for "empty" format type for floats (GH-123561) 
(#124597)

gh-123560: Correct docs for "empty" format type for floats (GH-123561)
(cherry picked from commit 274d9ab619b8150a613275835234ea9ef935f21f)

Co-authored-by: Sergey B Kirpichev <[email protected]>

files:
M Doc/library/string.rst

diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 1f316307965c11..57a1f920523035 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -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      |

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to