]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142019: Add description about the exponent of result formatted with presentation...
author1nftf <QfxZ11@proton.me>
Tue, 16 Dec 2025 11:56:12 +0000 (19:56 +0800)
committerGitHub <noreply@github.com>
Tue, 16 Dec 2025 11:56:12 +0000 (13:56 +0200)
Doc/library/string.rst

index 58c836c73823306917da3e4da6ffe302dafd217f..e3ad018d1d073bb323f88017bc62f99bd9dcb1f3 100644 (file)
@@ -546,6 +546,9 @@ The available presentation types for :class:`float` and
    |         | :class:`float`, and shows all coefficient digits         |
    |         | for :class:`~decimal.Decimal`.  If ``p=0``, the decimal  |
    |         | point is omitted unless the ``#`` option is used.        |
+   |         |                                                          |
+   |         | For :class:`float`, the exponent always contains at      |
+   |         | least two digits, and is zero if the value is zero.      |
    +---------+----------------------------------------------------------+
    | ``'E'`` | Scientific notation. Same as ``'e'`` except it uses      |
    |         | an upper case 'E' as the separator character.            |