[Python-3000] PyUnicodeObject implementation

Stefan Behnel stefan_ml at behnel.de
Tue Sep 9 12:55:07 CEST 2008


Stefan Behnel wrote:
> Antoine Pitrou wrote:
>> Stefan Behnel <stefan_ml <at> behnel.de> writes:
>>> From a Cython perspective, I find the lack of efficient subclassing after
>>> such a change particularly striking.
>> what do you call "efficient subclassing"? if you look at the current
>> implementation of unicode_subtype_new() in unicodeobject.c, it isn't very
>> efficient (everything including the raw data buffer is allocated twice).
> 
> That's something that may be optimised one day without affecting user code.

Coming back to this: Why is this done anyway? Can't the new instance of the 
unicode-subtype just steal the buffer pointer of the already allocated unicode 
object?

Stefan




More information about the Python-3000 mailing list