New submission from Eric Smith <e...@trueblade.com>: Originally discussed in issue 6871. Even if an alignment of "<" is specified, "=" is used if the padding character is "0".
>>> format(2, '0<20') '00000000000000000002' >>> format(2, '1<20') '21111111111111111111' This is a problem for at least float and integers. This should probably be backported to 2.6 and 3.1, but I'll have to wait and see how invasive the patch is. ---------- assignee: eric.smith components: Interpreter Core messages: 92586 nosy: eric.smith, marketdickinson, skrah priority: normal severity: normal status: open title: Built-in types format incorrectly with 0 padding. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6902> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com