[Python-Dev] PEP 393 Summer of Code Project (original) (raw)

Stefan Behnel stefan_ml at behnel.de
Tue Aug 23 09:02:54 CEST 2011


Torsten Becker, 22.08.2011 20:58:

I have implemented an initial version of PEP 393 -- "Flexible String Representation" as part of my Google Summer of Code project. My patch is hosted as a repository on bitbucket [1] and I created a related issue on the bug tracker [2]. I posted documentation for the current state of the development in the wiki [3].

Very cool!

I've started fixing up Cython for it.

One thing I noticed: on platforms where wchar_t is signed, the comparison to "128U" in the Py_UNICODE_ISSPACE() macro may issue a warning when applied to a Py_UNICODE value (which it previously was officially defined on). For the sake of portability of existing code, this may be worth a work-around.

Personally, I wouldn't really mind getting this warning, given that it's better to use Py_UCS4 instead of Py_UNICODE. But it may turn out to be an annoyance for users, because their code that does this isn't actually broken in the new world.

And one thing that I find unfortunate is that we need a new (unexpected) _GET_LENGTH() next to the existing (and obvious) _GET_SIZE(), but I guess that's a somewhat small price to pay for backwards compatibility...

Stefan



More information about the Python-Dev mailing list