Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- From: TheFlyingDutchman <zzbbaadd@xxxxxxx>
- Date: Wed, 31 Oct 2007 13:57:37 -0700
On Oct 31, 8:11 am, Carl Banks <pavlovevide...@xxxxxxxxx> 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()"
.
- References:
- shouldn't 'string'.find('ugh') return 0, not -1 ?
- From: jelle
- Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- From: Carl Banks
- shouldn't 'string'.find('ugh') return 0, not -1 ?
- Prev by Date: Re: 3 number and dot..
- Next by Date: Re: 3 number and dot..
- Previous by thread: Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- Next by thread: Re: shouldn't 'string'.find('ugh') return 0, not -1 ?
- Index(es):
Relevant Pages
|