Eric V. Smith <e...@trueblade.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39077>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to