[Python-Dev] PEP 393: Flexible String Representation

Stefan Behnel stefan_ml at behnel.de
Sat Jan 29 18:03:23 CET 2011


"Martin v. Löwis", 24.01.2011 21:17:
> I'd like to propose PEP 393, which takes a different approach,
> addressing both problems simultaneously: by getting a flexible
> representation (one that can be either 1, 2, or 4 bytes), we can
> support the full range of Unicode on all systems, but still use
> only one byte per character for strings that are pure ASCII (which
> will be the majority of strings for the majority of users).
>
> You'll find the PEP at
>
> http://www.python.org/dev/peps/pep-0393/
>[...]
> The Py_UNICODE type is still supported but deprecated. It is always
> defined as a typedef for wchar_t, so the wstr representation can double
> as Py_UNICODE representation.

What about the character property functions?

http://docs.python.org/py3k/c-api/unicode.html#unicode-character-properties

Will they be adapted to accept Py_UCS4 instead of Py_UNICODE?

Stefan



More information about the Python-Dev mailing list