array of characters?
Ian Kelly
ian.g.kelly at gmail.com
Fri Mar 22 15:54:17 EDT 2019
I don't know the answer, and PEP 393 doesn't talk about the array('u')
deprecation directly. But it seems to me that with Py_UNICODE going away
this array type code would have to be completely reimplemented, and also at
that point array('u') is just equivalent to array('L') with some extra
conversion semantics. Maybe it's simply deprecated because nobody has
proposed keeping it and anybody who really wants it can accomplish the same
with 'L'.
On Fri, Mar 22, 2019 at 1:28 AM Gregory Ewing <greg.ewing at canterbury.ac.nz>
wrote:
> Paul Rubin wrote:
> > - array('u') works but it is deprecated, and (not sure) the doc page
> > says the object size is 2 bytes, so it may only handle BMP characters
>
> The docs actually say "Depending on the platform, it can be 16 bits or 32
> bits".
>
> With Python 3.5 on MacOSX, it seems to work and hold the full range of
> unicode characters.
>
> Not sure why this is being deprecated instead of just making it always
> 32 bits. I'll make some enquiries.
>
> --
> Greg
> --
> https://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list