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 serhiy.storchaka
Recipients bignose, eric.smith, serhiy.storchaka
Date 2018-12-20.22:10:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545343812.13.0.788709270274.issue27772@psf.upfronthosting.co.za>
In-reply-to
Content
PR 11270 fixes this issue by making such format valid. Preceding the width field by '0' no longer affects the default alignment for strings, i.e. no longer sets the alignment to invalid '=' if it is not specified explicitly.

>>> format('abc', '<8')
'abc     '
>>> format('abc', '8')
'abc     '
>>> format('abc', '<08')
'abc00000'
>>> format('abc', '08')
'abc00000'

This does not contradict the documentation, which specifies this case for numeric types, but not for strings.
History
Date User Action Args
2018-12-20 22:10:12serhiy.storchakasetrecipients: + serhiy.storchaka, eric.smith, bignose
2018-12-20 22:10:12serhiy.storchakasetmessageid: <1545343812.13.0.788709270274.issue27772@psf.upfronthosting.co.za>
2018-12-20 22:10:12serhiy.storchakalinkissue27772 messages
2018-12-20 22:10:11serhiy.storchakacreate