[Python-Dev] find method for lists

Skip Montanaro skip@pobox.com (Skip Montanaro)
Wed, 25 Jul 2001 11:30:19 -0500

This has probably been discussed before, but why doesn't the list object
support a find method?  Seems like if a non-exception-raising index method
is good enough for strings, it should be good enough for lists as well.  I
realize I can use "l.count(x) and l.index(x)" to avoid the possible
ValueError.  (Or maybe it's strings that shouldn't have find, but can't be
deleted not for code breakage reasons?)

I'm mostly just curious.  Am I missing something?