On 04/12/2016 09:20 AM, Chris Angelico wrote:
On Wed, Apr 13, 2016 at 2:15 AM, Ethan Furman

latin1?  I thought latin1 had a code point for 0-255, so how could using it
raise an encoding error?

Latin-1 / ISO-8859-1 defines a character for every byte, so any byte
string will *decode*. It only defines 256 characters as having
equivalent bytes, though, so *encoding* can fail.

Ah, right -- so if you start with bytes it cannot fail, if you start with a string it can.

--
~Ethan~

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to