mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125428)
gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426)
(cherry picked from commit cfc27bc50f
)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
98655cec0e
commit
1279be610d
1 changed files with 4 additions and 6 deletions
|
@ -509,9 +509,8 @@ The available presentation types for :class:`float` and
|
|||
| | significant digits. With no precision given, uses a |
|
||||
| | precision of ``6`` digits after the decimal point for |
|
||||
| | :class:`float`, and shows all coefficient digits |
|
||||
| | for :class:`~decimal.Decimal`. If no digits follow the |
|
||||
| | decimal point, the decimal point is also removed unless |
|
||||
| | the ``#`` option is used. |
|
||||
| | for :class:`~decimal.Decimal`. If ``p=0``, the decimal |
|
||||
| | point is omitted unless the ``#`` option is used. |
|
||||
+---------+----------------------------------------------------------+
|
||||
| ``'E'`` | Scientific notation. Same as ``'e'`` except it uses |
|
||||
| | an upper case 'E' as the separator character. |
|
||||
|
@ -522,9 +521,8 @@ The available presentation types for :class:`float` and
|
|||
| | precision given, uses a precision of ``6`` digits after |
|
||||
| | the decimal point for :class:`float`, and uses a |
|
||||
| | precision large enough to show all coefficient digits |
|
||||
| | for :class:`~decimal.Decimal`. If no digits follow the |
|
||||
| | decimal point, the decimal point is also removed unless |
|
||||
| | the ``#`` option is used. |
|
||||
| | for :class:`~decimal.Decimal`. If ``p=0``, the decimal |
|
||||
| | point is omitted unless the ``#`` option is used. |
|
||||
+---------+----------------------------------------------------------+
|
||||
| ``'F'`` | Fixed-point notation. Same as ``'f'``, but converts |
|
||||
| | ``nan`` to ``NAN`` and ``inf`` to ``INF``. |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue