[docs] [issue32790] Keep trailing zeros in precision for string format option g

Mark Dickinson report at bugs.python.org
Thu Feb 8 14:40:01 EST 2018


Mark Dickinson <dickinsm at gmail.com> added the comment:

> Maybe the documentation could also add this information in the chart for 'g' here:

Agreed that that would make sense. All the information is *there* in the docs (the alternate format is described a bit above that table), but it's not very easy to extract the information.

And that table entry is misleading as it currently is, since it suggests that trailing zeros are removed unconditionally: "In both cases insignificant trailing zeros are removed from the significand, and the decimal point is also removed if there are no remaining digits following it."

Perhaps we could adopt something like the wording in the C standard, where it says:

> Finally, unless the # flag is used, any trailing zeros are removed
> from the fractional portion of the result and the decimal-point
> character is removed if there is no fractional portion remaining.

Re-classifying as a documentation issue.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32790>
_______________________________________


More information about the docs mailing list