[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-08-15 Thread Ben Finney
Ben Finney added the comment: Terry Reedy wrote: > If the spec string is still available, it could be searched and the message > adjusted if '=' is not present. That proposal should be a new issue if > someone wants to push it. Done now, see Issue 27772. -- nosy: +bignose

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-22 Thread py.user
py.user added the comment: Terry J. Reedy (terry.reedy) wrote: > You example says to left justify '1' Nope. The fill character goes before alignment in the specification (grammatics). >>> format(1, '0<2') '10' >>> This is right. But 02 - is zero padding of a number which can be done only

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset de669512df97 by Terry Jan Reedy in branch '2.7': Issue #15660: Further clarify 0 prefix for width specifier in formats. https://hg.python.org/cpython/rev/de669512df97 New changeset 34cbc5d8a173 by Terry Jan Reedy in branch '3.5': Issue #15660:

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: You example says to left justify '1' >>> format(1, '<2') '1 ' and then pad with '0' instead of ' '. -- ___ Python tracker

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This came up again on python-list today in thread "Replace weird error message?" by "the.gerenuk--- via Python-list". After reading the discussion, I decided that expecting someone to read and connect together two sentences half a page apart is expecting a

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: > ''' > 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 '='. > ''' I think that's good. > I

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2016-03-18 Thread py.user
py.user added the comment: There is a funny thing in 3.6.0a0 >>> '{:<09}'.format(1) '1' >>> '{:<09}'.format(10) '1' >>> '{:<09}'.format(100) '1' >>> Actually, it behaves like a string, but the format should call internal format function of the passed number and the

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2012-08-17 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: needs patch - committed/rejected status: open - closed title: In str.format there is a misleading error message about alignment - Clarify 0 prefix for width specifier in str.format doc, ___

[issue15660] Clarify 0 prefix for width specifier in str.format doc,

2012-08-17 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- assignee: docs@python - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15660 ___ ___