On Mon, Apr 29, 2013 at 11:59 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:

Actually, I think a hexdump() function in pprint would be a nice
addition. I find myself wanting it when inspecting some binary protocols
(e.g. pickle :-)).

Python 2.7 had
>>> 'alkdjfa'.encode('hex')
'616c6b646a6661'

So why not:

>>> b'asdf'.decode('hexdump')
'61 73 64 66'

Yuval