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 <>
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')
>>> format('abc', '08')

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