[Python-Dev] String method: longest common prefix of two strings

Guido van Rossum guido@python.org
Sun, 19 Jan 2003 09:42:06 -0500


> I'd like to get some feedback on a new string method which might
> be useful: getting the longest common prefix of two strings.

If you really need this implemented as fast as possible, I'd suggest
writing a C extension that does just that.  I don't want to add every
useful string operation that anybody ever comes up with to be added as
a string method -- there are just too many of those.

--Guido van Rossum (home page: http://www.python.org/~guido/)