[Python-Dev] Python3 "complexity"

Paul Moore p.f.moore at gmail.com
Thu Jan 9 23:23:44 CET 2014

On 9 January 2014 22:00, Chris Barker <chris.barker at noaa.gov> wrote:
> On Thu, Jan 9, 2014 at 1:45 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> > latin-1 guaranteed to work with any binary data, and round-trip
>> > accurately?
>> Yes, it is.
>> > and will surrogateescape work for arbitrary binary data?
>> Yes, it will.
> Then maybe this is really a documentation issue, after all.

Certainly, the idea that you can use the latin1 codec and you'll get
the same sort of "ascii works and you can safely ignore the rest"[1]
behaviour that you get in Python 2 is not well promoted, and is


[1] Where "safely" means "probably not as safely as you think, but
I'll try not to nag you" :-) And of course you have to make sure you
don't *add* any content that uses unicode characters beyond 255, or
you get encoding errors. But you weren't going to do that, were you?

More information about the Python-Dev mailing list