tuple.index()

Glenn Hutchings zondo42 at googlemail.com
Thu Dec 14 07:15:34 EST 2006


Nick Maclaren wrote:
> Why doesn't the tuple type have an index method?  It seems such a
> bizarre restriction that there must be some reason for it.

In fact, tuples have no non-__underscored__ methods at all.  The list
count() method would also be useful for tuples, since it doesn't modify
anything.  I have no idea why they aren't implemented either.

Glenn




More information about the Python-list mailing list