From: 1nftf Date: Tue, 16 Dec 2025 11:56:12 +0000 (+0800) Subject: gh-142019: Add description about the exponent of result formatted with presentation... X-Git-Tag: v3.15.0a3~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e27f76b6fe9340d9c92571a83e3e91baf52d140b;p=thirdparty%2FPython%2Fcpython.git gh-142019: Add description about the exponent of result formatted with presentation type 'e' (#142084) --- diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 58c836c73823..e3ad018d1d07 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -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. |