Sion Arrowsmith wrote:
>>The name index implies it returns something you can use as an index to >>get at the substring. > > Unfortunately, -1 can of course be used as an index. Mind you, it > would be perverse to expect to find the substring at it. > That was my point. The returned index always points at the substring, therefore the function which returns a -1 isn't returning an index. Therefore index must be the one which raises an exception. -- http://mail.python.org/mailman/listinfo/python-list
