From 154013a3e1910bffa189b3e523bbe2a519b9ca35 Mon Sep 17 00:00:00 2001 From: 1nftf Date: Sat, 29 Nov 2025 21:44:45 +0800 Subject: [PATCH] Add description about the exponent of result formatted with presentation type 'e'. --- Doc/library/string.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 58c836c7382330..1d863751508c90 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -546,6 +546,11 @@ 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. | + | | | + | | The number of zeros padding to the exponent is | + | | determined by the implementation. When the coefficient | + | | is zero, the exponent value is also determined by the | + | | implementation. | +---------+----------------------------------------------------------+ | ``'E'`` | Scientific notation. Same as ``'e'`` except it uses | | | an upper case 'E' as the separator character. |