index() and count() methods

Grant Griffin not.this at
Sat Jun 15 00:14:49 CEST 2002

In article <GxproF.1y4K at>, Douglas says...
>Apologies if this is a FAQ, but I haven't run across an answer.
>Why are index() and count() methods of only mutable sequences, rather
>than all sequences?  I ran into a situation today where using index()
>on a tuple would have been nice.  It was easy to work around; I'm just

This one isn't exactly a FAQ, but IIRC, a patch to this effect was once rejected
by Guido.  (In fact, I think it is even documented in Sourceforge.)  I think the
reasoning might have been that the bloat to Python wasn't worth the narrow
usefulness of the addition.

  -occasional-irregularity-ly y'rs,



Grant R. Griffin                                           g2 at
Publisher of dspGuru                     
Iowegian International Corporation      

More information about the Python-list mailing list