Ezio Melotti added the comment: > Note: Ezio, do you prefer format(value, 'x') for '{:x}'.format(value)?
While formatting a single value the former is better/shorter, but the latter is perhaps more common since you usually have something else in the string too. The latter can also be used to do something like: >>> '{num:x} {num:X} {num:#x} {num:#X}'.format(num=255) 'ff FF 0xff 0XFF' ---------- _______________________________________ 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