Serhiy Storchaka added the comment: I agree with you and always prefer formatting strings.
Your example shows that at least an alternative to str.zfill() should be mentioned in the educational purposes. With C-style formatting your example can be written more laconically: return "%0*x" % (length, ...) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26506> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com