[Python-Dev] Replacement for array.array('u')?

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 22 20:01:17 EDT 2019


Serhiy Storchaka wrote:
> Making it always 32 bits would be compatibility breaking change. 
> Currently array('u') represents the wchar_t string, and many API on 
> Windows require it.

Ah, I see. It would be helpful if the array module docs made that clear.
At one point the 3.x docs said that it depended on whether you had a wide
or narrow unicode Python build, which confused me, because I thought that 
distinction had gone away in Python 3.

> But we can add a new code, e.g. 'U', for UCS4.

+1.

-- 
Greg


More information about the Python-Dev mailing list