Le Mon, 29 Apr 2013 14:32:46 +0300, Yuval Greenfield firstname.lastname@example.org a écrit :
On Mon, Apr 29, 2013 at 11:59 AM, Antoine Pitrou email@example.com:
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
So why not:
'61 73 64 66'
Command-line hexdump has a bit more options and abilities, such as wrapping to N character width, printing an ASCII transcript beside the representation, etc.
To support this flexibility, a module function is better than a codec :-)