What's the design thinking behind this?
To me it's easier to do something like
if string.index(substring) > -1:
# do stuff
than trying to catch an exception. If the substring
is not found, at least your program doesn't break.
Someone told me 'returning -1 is a bad pattern'. Why is that?
What is the Pythonic way for checking substring?