[Python-3000] Droping find/rfind?

Josiah Carlson jcarlson at uci.edu
Thu Aug 24 07:07:29 CEST 2006

Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Josiah Carlson wrote:
> > Given search as a potential replacement, about the only question is
> > whether count should default to sys.maxint or 1.
> Do you think that there will be many use cases for
> count values *other* than 1 or sys.maxint? If not,
> it might be more sensible to have two functions,
> search() and searchall().

I have used str.split with counts != 1 or sys.maxint, and I would guess
that there would be similar use-cases.

> And while we're on this, what about list.index?
> Should it also be replaced with list.search or
> whatever as well?

To be consistant from a sequence operation perspective, I would say yes,
though I have so rarely used list.index(), I'm hard-pressed to have much
of an opinion.

 - Josiah

More information about the Python-3000 mailing list