Why are index() and count() only for mutable sequences?

Bob Alexander bobalex at ix.netcom.com
Thu Jul 8 12:29:46 EDT 1999


There is no modification of the sequence performed by these functions -- it seems as though they could be available for all sequences. It would certainly be useful for tuples as well as lists (strings, too, for that matter, even though we have the more general string.find()).

-- Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/19990708/7d69096c/attachment.html>


More information about the Python-list mailing list