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

TheFlyingDutchman zzbbaadd at aol.com
Wed Oct 31 21:57:37 CET 2007


On Oct 31, 8:11 am, Carl Banks <pavlovevide... at gmail.com> wrote:

>
> string.find has always been kind of a wart in Python; that's why
> they're getting rid of it.  For testing for the presence of a
> substring, use the in operator:


Per the Python 3000 presentation given by Guido Van Rossum at
PyCon February 2007, the new Bytes type will have a "wart".

"Has some string-like methods, e.g. .find()"





More information about the Python-list mailing list