Robert Dailey wrote:
I notice that the '0x' portion is counted in the width, which was specified as 8. This seems wrong to me. Is this by design? If so, why?
Yes, it's the total field width. This is consistent with the other formats, in which it includes decimal points, signs, etc. If you don't want that, then write the format string as 'This is a hex number: 0x{:08x}' -- Greg -- http://mail.python.org/mailman/listinfo/python-list