[Python-Dev] Python3 "complexity"

Serhiy Storchaka storchaka at gmail.com
Fri Jan 10 19:05:31 CET 2014
10.01.14 14:19, M.-A. Lemburg написав(ла):
> BTW: Perhaps it would be a good idea to backport the
> surrogateescape error handler to Python 2.7 to simplify
> writing code which works in both Python 2 and 3.

You also should change the UTF-8 codec so that it will reject surrogates 
(i.e. u'\ud880'.encode('utf-8') and '\xed\xa2\x80'.decode('utf-8') 
should raise exceptions). And this will break much code.




More information about the Python-Dev mailing list