How come tuples don't have an index method?
Tim Peters
tim.one at home.com
Fri Sep 7 17:26:14 EDT 2001
[Tim]
> In 2.2, operator.countOf() works on any iterable object:
[Terry Reedy]
> Does it have operator.indexOf ()? Code would be nearly same.
Yes, and for years. I see PySequence_Index() (the C API spelling of
operator.indexOf) got overlooked in my 2.2 crusade to generalize these
things to work with all iterable objects, though -- I'll fix that for 2.2a4.
More information about the Python-list
mailing list