Michael Hartl wrote:
I actually find it strange that tuples don't have an index function,
since finding the index doesn't involve any mutation.  Anyone know why
Python doesn't allow a statement like t.index('foo')?

Tuples aren't really intended for this kind of use. See:

http://www.python.org/doc/faq/general.html#why-are-there-separate-tuple-and-list-data-types

Tuples are supposed to be operated on as a group. It's even been suggested occasionally on python-dev that in Python 3.0, tuples shouldn't support iteration at all...

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

Reply via email to