On 8/26/05, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> Taking a look at the commits that Guido did way back in 1993, he doesn't
> mention why he added .find, only that he did.  Maybe it was another of
> the 'functional language additions' that he now regrets, I don't know.

There's nothing functional about it. I remember adding it after
finding it cumbersome to write code using index/rindex. However, that
was long before we added startswith(), endswith(), and 's in t' for
multichar s. Clearly all sorts of varieties of substring matching are
important, or we wouldn't have so many methods devoted to it! (Not to
mention the 're' module.)

However, after 12 years, I believe that the small benefit of having
find() is outweighed by the frequent occurrence of bugs in its use.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to