Paul Ganssle <p.gans...@gmail.com> added the comment:
I don't believe this is a duplicate if #32267, which is actually about the %z directive. I think the implementation here is correct and the documentation is semi-correct, it depends on how you look at it, consider: >>> datetime(2018, 1, 1, 0, 0, 0, 1).strftime('%f') '000001' >>> datetime(2018, 1, 1, 0, 0, 0, 100000).strftime('%f') '100000' In the first case "1" got expanded to "000001" and "100000" was printed as-is. However, when you interpret it as being *after* the decimal point, you would consider the first one to not be zero-padded at all and the second one to be zero-padded on the right. I think the documentation can just be changed to "zero-padded to 6 digits" without specifying left or right. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33381> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com