mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.12] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125429)
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
f49221af46
commit
20323bf733
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 |
|
| | significant digits. With no precision given, uses a |
|
||||||
| | precision of ``6`` digits after the decimal point for |
|
| | precision of ``6`` digits after the decimal point for |
|
||||||
| | :class:`float`, and shows all coefficient digits |
|
| | :class:`float`, and shows all coefficient digits |
|
||||||
| | for :class:`~decimal.Decimal`. If no digits follow the |
|
| | for :class:`~decimal.Decimal`. If ``p=0``, the decimal |
|
||||||
| | decimal point, the decimal point is also removed unless |
|
| | point is omitted unless the ``#`` option is used. |
|
||||||
| | the ``#`` option is used. |
|
|
||||||
+---------+----------------------------------------------------------+
|
+---------+----------------------------------------------------------+
|
||||||
| ``'E'`` | Scientific notation. Same as ``'e'`` except it uses |
|
| ``'E'`` | Scientific notation. Same as ``'e'`` except it uses |
|
||||||
| | an upper case 'E' as the separator character. |
|
| | 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 |
|
| | precision given, uses a precision of ``6`` digits after |
|
||||||
| | the decimal point for :class:`float`, and uses a |
|
| | the decimal point for :class:`float`, and uses a |
|
||||||
| | precision large enough to show all coefficient digits |
|
| | precision large enough to show all coefficient digits |
|
||||||
| | for :class:`~decimal.Decimal`. If no digits follow the |
|
| | for :class:`~decimal.Decimal`. If ``p=0``, the decimal |
|
||||||
| | decimal point, the decimal point is also removed unless |
|
| | point is omitted unless the ``#`` option is used. |
|
||||||
| | the ``#`` option is used. |
|
|
||||||
+---------+----------------------------------------------------------+
|
+---------+----------------------------------------------------------+
|
||||||
| ``'F'`` | Fixed-point notation. Same as ``'f'``, but converts |
|
| ``'F'`` | Fixed-point notation. Same as ``'f'``, but converts |
|
||||||
| | ``nan`` to ``NAN`` and ``inf`` to ``INF``. |
|
| | ``nan`` to ``NAN`` and ``inf`` to ``INF``. |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue