On 11/20/2014 09:32 AM, Peter Otten wrote:
> Chris Angelico wrote:
> 
>> On Fri, Nov 21, 2014 at 2:40 AM, Peter Otten <__pete...@web.de> wrote:
>>> I think that you may get a Unicode/Encode/Error when you try to /decode/
>>> a unicode string is more confusing...
>>
>> Hang on a minute, what does it even mean to decode a Unicode string?
> 
> Let's not get philosophical ;)

It's not philosophical.  It's an important distinction that folks need
to be clear on when understanding unicode and the errors that python can
throw.

Unicode can only be encoded to bytes.
Bytes can only be decoded to unicode.

Without understanding that, the exception errors about decoding won't be
properly understood, nor will one know how to fix them.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to