Paul Rubin wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > >>If you want an exception from your code when 'w' isn't in the string >>you should consider using index() rather than find. > > > The idea is you expect w to be in the string. If w isn't in the > string, your code has a bug, and programs with bugs should fail as > early as possible so you can locate the bugs quickly and easily. That > is why, for example, > > x = 'buggy'[None] > > raises an exception instead of doing something stupid like returning 'g'.
You did read the sentence you were replying to, didn't you? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list