Message381686
Here's a first draft of proposed re-wording for the 'e', 'f' and 'g' sections of the table in the general format-specification mini-language docs. (I started making a PR, but got too annoyed with the mechanics of editing reStructuredText tables.)
'e': Scientific "E" notation. For a given precision ``p >= 0``, formats the
number in scientific notation with the letter 'e' separating the coefficient
from the exponent. The coefficient has one digit before and ``p`` digits after
the decimal point, for a total of ``p + 1`` significant digits. With no
precision, uses a precision of ``6`` digits after the decimal point for
:class:`float`, and shows all coefficient digits (including any trailing zeros)
for :class:`~decimal.Decimal`.
'f': Fixed-point notation. For a given precision ``p >= 0``, formats the number
as a decimal number with exactly ``p`` digits following the decimal point. With
no precision, uses a precision of ``6`` digits after the decimal point for
:class:`float`, and shows all coefficient digits (including any trailing zeros)
for :class:`~decimal.Decimal`. Note that in the case of a
:class:`~decimal.Decimal` instance with a positive exponent, the formatted
output will consist of the digits of the coefficient sequence extended by
additional zeros: for example, ``format(Decimal('1.23e4'), 'f')`` gives
``'12300'``.
'g': <text as before, up to but not including the last paragraph, then:>
A precision of ``0`` is treated as equivalent to a precision of ``1``.
With no precision, uses a precision of ``6`` significant digits for
:class:`float`, and shows all coefficient digits (including any trailing zeros)
for :class:`~decimal.Decimal`. |
|
Date |
User |
Action |
Args |
2020-11-23 18:31:45 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith, docs@python, Kwpolska |
2020-11-23 18:31:45 | mark.dickinson | set | messageid: <1606156305.17.0.665638046866.issue42429@roundup.psfhosted.org> |
2020-11-23 18:31:45 | mark.dickinson | link | issue42429 messages |
2020-11-23 18:31:44 | mark.dickinson | create | |
|