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 Wicken
Recipients Wicken, eric.smith, mark.dickinson, serhiy.storchaka, veky
Date 2019-11-02.14:23:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572704624.25.0.877687961818.issue38657@roundup.psfhosted.org>
In-reply-to
Content
Given the comments above I appreciate that this is actually due to the padding being the total field width rather than the padding of the digits themselves. Having revised the documentation again, I believe this following line is explaining it:

"When no explicit alignment is given, preceding the width field by a zero ('0') character enables sign-aware zero-padding for numeric types. This is equivalent to a fill character of '0' with an alignment type of '='."

(https://docs.python.org/3.8/library/string.html)

I initially read "sign-aware zero-padding for numeric types" to mean the padding would not blindly prepend, and would take into account any signs and pad after (hence initially making this a bug). So maybe as suggested above we should explicitly mention the padding is the total number of characters in the field, rather than just the numbers.

I can look into adding this soon and see what you all think.
History
Date User Action Args
2019-11-02 14:23:44Wickensetrecipients: + Wicken, mark.dickinson, eric.smith, serhiy.storchaka, veky
2019-11-02 14:23:44Wickensetmessageid: <1572704624.25.0.877687961818.issue38657@roundup.psfhosted.org>
2019-11-02 14:23:44Wickenlinkissue38657 messages
2019-11-02 14:23:43Wickencreate