py.user added the comment: There is a funny thing in 3.6.0a0
>>> '{:<09}'.format(1) '100000000' >>> '{:<09}'.format(10) '100000000' >>> '{:<09}'.format(100) '100000000' >>> Actually, it behaves like a string, but the format should call internal format function of the passed number and the internal format function should not format different numbers as equal numbers. Why does it represent number 1 as number 10? >>> format(1, '<02') '10' >>> format(10, '') '10' >>> I guess, there should be a restriction. Zero padding for numbers should be correct. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15660> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com