[Python-Dev] Re: Re: Alternative Implementation forPEP 292:SimpleStringSubstitutions (original) (raw)

Fredrik Lundh fredrik at pythonware.com
Sat Sep 4 15:20:55 CEST 2004


M.-A. Lemburg wrote:

Yes. Whatever MAL and Barry thinks, Python's current model is 8+8=8, U+U=U, and 8+U=U for ascii U. That's an advantage, not a bug. Indeed, but I don't see how that's different from what the PEP is saying.

the current implementation is

 T(8) % 8 = U.

which violates the 8+8=8 rule.

And when that time comes, storing everything as 32-bit characters is not the right answer either. I'll leave that for the libc designers to decide :-) If you look at performance, there's not much difference between 8-bit strings and Unicode, so the only argument against using Unicode for storing text data is memory usage.

I used to make that argument, but these days, I no longer think that you can talk about performance without taking memory usage into account.



More information about the Python-Dev mailing list