[Python-ideas] Stop displaying elements of bytes objects as printable ASCII characters in CPython 3
Nick Coghlan
ncoghlan at gmail.com
Wed Sep 10 09:45:38 CEST 2014
On 10 September 2014 17:42, Cory Benfield <cory at lukasa.co.uk> wrote:
> For what it's worth, Nick has made this comment:
>
>> Primarily because it's incredibly useful for debugging ASCII based
>> binary formats (which covers many network protocols and file formats).
>
> This is true, but it goes both ways: it makes it a lot *harder* to
> debug pure-binary network formats (like HTTP/2). I basically have to
> have an ASCII codepage in front of me to debug using the printed
> representation of a bytestring because I keep getting characters
> thrown into my nice hex output. Sadly, you can't please everyone.
memoryview.cast can be a potentially useful tool for that :)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list