[Python-Dev] Re: Alternative Implementation for PEP 292: Simple String Substitutions

Fredrik Lundh fredrik at pythonware.com
Sat Sep 11 11:51:23 CEST 2004


M.-A. Lemburg wrote:

>> (google for "stringlib" for some work I'm doing in this area)
>
> Ah, now I know where you're coming from :-) Shift tables
> don't work well in the Unicode world with its large alphabet.

since most real-life text use characters from only a small number of regions
in that alphabet, compressed shift tables work extremely well (the algorithm
on the stringlib page shows one way to do that, in constant space and O(m)
time).

> BTW, you might want to look at the BMS implementation I did
> for mxTextTools.

did you ever get around to add Unicode support to mxTextTools ?

</F> 





More information about the Python-Dev mailing list