On Thu, 25 Aug 2005 00:05:18 -0400
Steve Holden wrote:

> What on earth makes you call this a bug? And what are you proposing that 
> find() should return if the substring isn't found at all? please don't 
> suggest it should raise an exception, as index() exists to provide that 
> functionality.

Returning -1 looks like C-ism for me. It could better return None when none
is found.

index = "Hello".find("z")
if index is not None:
     # ...

Now it's too late for it, I know.

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

Reply via email to