how to avoid leading white spaces

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Jun 3 21:41:33 EDT 2011


Chris Torek wrote:
> Python might be penalized by its use of Unicode here, since a
> Boyer-Moore table for a full 16-bit Unicode string would need
> 65536 entries

But is there any need for the Boyer-Moore algorithm to
operate on characters?

Seems to me you could just as well chop the UTF-16 up
into bytes and apply Boyer-Moore to them, and it would
work about as well.

-- 
Greg



More information about the Python-list mailing list