index() and count() methods
not.this at seebelow.org
Sat Jun 15 00:14:49 CEST 2002
In article <GxproF.1y4K at beaver.cs.washington.edu>, 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.
Grant R. Griffin g2 at dspguru.com
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
More information about the Python-list