This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients eric.smith, facundobatista, mamrhein, mark.dickinson, rhettinger, skrah
Date 2019-12-17.21:30:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576618235.95.0.522591979719.issue39077@roundup.psfhosted.org>
In-reply-to
Content
> Regarding cases 3-7 I'd like to suggest a slightly different resolution:

Hmm, yes. I was concentrating on the Decimal results, but I agree that these int/float results are disturbing:

>>> format(12345, "<020")
'12345000000000000000'
>>> format(12345.0, "<020")
'12345.00000000000000'
>>> format(12345, "^020")
'00000001234500000000'

I'm fine with an explicit *fill* character of zero producing misleading results; the user just gets what they ask for in that case. (And the filling could be happening in generic code that isn't aware of the numeric context any more, so it could be tricky to change.)

But having the pre-width 0 be interpreted this way is questionable. Eric: thoughts?
History
Date User Action Args
2019-12-17 21:30:35mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, facundobatista, mamrhein, eric.smith, skrah
2019-12-17 21:30:35mark.dickinsonsetmessageid: <1576618235.95.0.522591979719.issue39077@roundup.psfhosted.org>
2019-12-17 21:30:35mark.dickinsonlinkissue39077 messages
2019-12-17 21:30:35mark.dickinsoncreate