On Thu, 30 Aug 2007 09:53:53 -0400, Marshall T. Vandegrift wrote: > The Python string types have both the method `index()` which throws an > exception and the method `find()` which implements the same behavior but > returns -1 for not-found substrings. I would naively have assumed the > `list` type to provide both as well, but it provides only `index()`. > > Anyone know the reason for this lack of parallelism?
Historical reasons and IIRC the `find()` method on strings will go away in Python 3.0. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list