March 21, 2016
11:11 a.m.
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 <report@bugs.python.org> <http://bugs.python.org/issue26506> _______________________________________