On 10 September 2014 08:45, Nick Coghlan ncoghlan@gmail.com wrote:
memoryview.cast can be a potentially useful tool for that :)
Sure, and so can binascii.hexlify (which is what I normally use). I'm not saying I can't debug my binary data, that would be a pretty weird complaint. I'm saying that I don't get to do debugging with a simple print statement when using the bytes type to do actual binary work, while those who are doing sort-of binary work do.
I'm not actually personally bothered here: I do plenty of HTTP/1.1 work as well where this 'feature' is useful, and I'm experienced enough that I know what I'm getting into and I can work around it. My point is more that this adds further confusion to the notion that 'bytes are not text', when much of the language seems to go out of its way to pretend that they are in fact ASCII-encoded text.
This is probably going to get wildly off-topic, so if you'd like to continue this chat Nick we should either take it off-list or to a new thread. =)