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 eric.smith
Recipients eric.smith, facundobatista, mamrhein, mark.dickinson, rhettinger, skrah
Date 2019-12-17.21:45:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576619128.26.0.595732005929.issue39077@roundup.psfhosted.org>
In-reply-to
Content
I'm not sure what you mean by the "pre-width 0". Is that the "0" here:

format_spec ::=  [[fill]align][sign][#][0][width][grouping_option][.precision][type]

?

And now that I write out the question, I'm sure that's what you mean.

PEP 3101 says "If the width field is preceded by a zero ('0') character, this enables zero-padding. This is equivalent to an alignment type of '=' and a fill character of '0'.". I don't see any other discussion of it in the PEP. In particular, what if you specify a different alignment type with the pre-width 0?

I believe this all originated in C's printf, via PEP 3101. Has anyone checked what C does?

But in any event, I don't think we can change the int formatting, in particular. There's no doubt someone who's relying on every little quirk. I'm less concerned about float and decimal, although we'd still need to be very careful.
History
Date User Action Args
2019-12-17 21:45:28eric.smithsetrecipients: + eric.smith, rhettinger, facundobatista, mark.dickinson, mamrhein, skrah
2019-12-17 21:45:28eric.smithsetmessageid: <1576619128.26.0.595732005929.issue39077@roundup.psfhosted.org>
2019-12-17 21:45:28eric.smithlinkissue39077 messages
2019-12-17 21:45:28eric.smithcreate