On 2007-04-09, Georg Brandl <[EMAIL PROTECTED]> wrote: > Paul Rubin schrieb: >> Carsten Haese <[EMAIL PROTECTED]> writes: >>> Will tuples also get a sort method? What about append and extend? pop? >>> __iadd__? __delslice__? >> >> They are immutable so they won't get .sort() etc. sorted(...) already >> works on them. >> >>> How many brain cells are actually freed up by not having to remember >>> that *one* method that you'd never use doesn't exist? >> >> I dunno but I do know that Ruby is attracting a lot of potential Python >> users because it apparently has fewer of these inconsistencies. > > It remains to be proven that it is an inconsistency, rather than a design > decision.
The two don't contradict. A design decision can introduce an inconsistency. AFAICS having an index method on tuples seems rather natural. Looking for the index of a particular item in your sequence seems just as usefull independant of the nature of your sequence. So unless there is some rather forcefull argument it seems inconsistent to have some sequences lacking this method. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list