Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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.

----------
nosy: +serhiy.storchaka

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

Reply via email to