eryk sun <eryk...@gmail.com>:

> On Sat, Jan 21, 2017 at 8:21 PM, Pete Forman <petef4+use...@gmail.com> wrote:
>> Marko Rauhamaa <ma...@pacujo.net> writes:
>>
>>>> py> low = '\uDC37'
>>>
>>> That should raise a SyntaxError exception.
>>
>> Quite. [...]
>
> CPython allows surrogate codes for use with the "surrogateescape" and
> "surrogatepass" error handlers, which are used for POSIX and Windows
> file-system encoding, respectively.

Yes, but at the cost of violating Unicode, leading to unprintable
strings etc. In my opinion, Python should have "stayed pure" instead of
playing cheap tricks with surrogates.

(Of course, Unicode itself is a mess, but that's another story.)


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to