[Python-3000] PyUnicodeObject implementation

Antoine Pitrou solipsis at pitrou.net
Sat Sep 6 12:40:35 CEST 2008


Jeremy Kloth <jeremy.kloth <at> gmail.com> writes:
> 
> I don't know if this is too late to do before the final release, but shouldn't 
> the implementation of PyUnicodeObject be updated to match the much more 
> efficient old PyStringObject layout?  I mean eliminating the double malloc 
> that is currently required for each unicode string.

I have already written such a patch some months ago, you can find it here:
http://bugs.python.org/issue1943

You will perhaps need to adapt the patch a bit in order for it to work properly
with the current py3k branch.

Also note that Marc-André Lemburg (one of the authors of the unicode
implementation) is opposed to that change. See the discussion in the bug tracker
issue for the details.

Regards

Antoine.




More information about the Python-3000 mailing list