index() of sequence type?

Diez B. Roggisch deets at nospam.web.de
Thu Feb 7 08:31:44 EST 2008


Neal Becker wrote:

> I see list has index member, but is there an index function that applies
> to any sequence type?
> 
> If not, shouldn't there be?

Looks like an oversight to me as well, yes. The only "difficult"
implementation would be the one for xrange, because you can't search but
must compute the result - but that should be trivial. 

Diez



More information about the Python-list mailing list