Casey wrote:
... Is this the 'official' way to do this?...  Why wouldn't you just use:
print(bytes.decode(b'abc\n'), end='')

Because that code is incapable of sending bytes that cannot be
interpreted as encoded in the "default" encoding.  If you are
sending a picture, for example, all possible byte sequences might
show up.  If the default encoding is "utf-8", for example, there
are byte sequences which are illegal.  I suspect you are confused
by thinking each byte must map to a character; such an encoding
could never suffice for Chinese, for example.

--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to