In Python (3) at least, if a binary value has an ASCII representation, it is shown instead of the hexadecimal value. For instance, the binary value of 67 which
67
After installing my package all-escapes there will be a new codec available for this usage.
>>> b = bytes([10,67,128]) >>> print(b.decode("all-escapes")) \x0a\x43\x80