[pypy-dev] PyPy 2 unicode class

Johan Råde johan.rade at gmail.com
Thu Jan 23 17:26:29 CET 2014


On 2014-01-22 08:01, Johan Råde wrote:

> Next, would such a change break any existing Python 2 code on Windows?
> Yes it will. For instance the following code for counting characters in
> a string:
>
>   f = [0] * (1 << 16)
>   for c in s:
>       f[ord(c)] += 1

I would like to qualify this statement.

Getting rid of the UTF-16 interface for the unicode class in Python 2 on 
Windows will:
* not break any well-written code
* fix a lot of poorly written code.

(The above code snippet is not well-written code.)

--Johan




More information about the pypy-dev mailing list