Ben Finney <ben+pyt...@benfinney.id.au>:

> Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes:
>
>> '\udd00' should be a SyntaxError.
>
> I find your argument convincing, that attempting to construct a
> Unicode string of a lone surrogate should be an error.

Then we're back to square one:

   >>> b'\x80'.decode('utf-8', errors='surrogateescape')
   '\udc80'


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

Reply via email to