[Python-3000] Thoughts on new I/O library and bytecode
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Feb 26 04:19:47 CET 2007
Neil Schemenauer wrote:
> Practicality beats purity here, I think. For example, if I'm
> debugging a network protocol, I'd prefer
>
> b"EHLO ...\x0d\x0a"
But what if I'm *not* debugging a network protocol,
and my bytes objects all look like random gibberish
when displayed as characters?
To put it another way: If bytes objects are displayed
in hex by default (see previous post), I can easily get
them displayed as characters if that's what I want using
str(b, suitable_encoding).
But if they're displayed as characters by default,
what do I do to get them displayed as not-characters?
--
Greg
More information about the Python-3000
mailing list