Generalize operator.indexOf (PySequence_Index) to work with any
iterable object. I'm not sure how that got overlooked before!
Got rid of the internal _PySequence_IterContains, introduced a new
internal _PySequence_IterSearch, and rewrote all the iteration-based
"count of", "index of", and "is the object in it or not?" routines to
just call the new function. I suppose it's slower this way, but the
code duplication was getting depressing.
diff --git a/Misc/NEWS b/Misc/NEWS
index 87bf717..ecc4588 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -5,6 +5,9 @@
Library
+- operator.indexOf() (PySequence_Index() in the C API) now works with any
+ iterable object.
+
Tools
Build