[Python-checkins] CVS: python/dist/src/Misc NEWS,1.238,1.239

Tim Peters tim_one@users.sourceforge.net
Fri, 07 Sep 2001 21:00:14 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv1044/python/Misc

Modified Files:
	NEWS 
Log Message:
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.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.238
retrieving revision 1.239
diff -C2 -d -r1.238 -r1.239
*** NEWS	2001/09/08 01:25:46	1.238
--- NEWS	2001/09/08 04:00:12	1.239
***************
*** 6,9 ****
--- 6,12 ----
  Library
  
+ - operator.indexOf() (PySequence_Index() in the C API) now works with any
+   iterable object.
+ 
  Tools