Wai Yip <auror...@gmail.com> wrote:

> I started with ctypes because it is the battery included with the
> Python standard library. My code is very fluid and I'm looking for
> easy opportunity to optimize it. One example is to find the longest
> common prefix among two strings. Right now I am comparing it character
> by character with pure Python. It seems like an ideal low hanging
> fruit. With ctype I can rewriting a few lines of Python into a few
> lines of C. All the tools are available and no third party library is
> needed.

Alternatively you could just use os.path.commonprefix().

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to