"Carsten Haese" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Adding useless features always makes a product worse. What's your use
> case for tuple.index?

I find this question odd for the following reason:
I doubt that *anyone* who programs in Python
has not encountered the situation where they change
a tuple to a list *solely* for the purpose of getting
access to the index method.  There is simply no
conflict between the index method and immutability,
but at the moment you are forced to choose.

Anyway, for a simple use case, consider a game,
where the fixed set p of players have a fixed order.
A tuple is natural.  Now for a player you want to
construct the opponents.  If I had the index i it wd
be p[:i]+p[i+1:], but how to get the index?

Cheers,
Alan Isaac


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to