Re: shouldn't 'string'.find('ugh') return 0, not -1 ?



On 10/31/07, jelle <jelleferinga@xxxxxxxxx> wrote:
the subject pretty much says it all.
if I check a string for for a substring, and this substring isn't found,
should't the .find method return 0 rather than -1?
this breaks the

if check.find('something'):
do(somethingElse)

print 'ughughugh'.find('ugh')

;-)

--
Cheers,
Simon B.
simon@xxxxxxxxxxxxxxxxxx
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues
.