[Python-checkins] python/dist/src/Misc NEWS,1.869,1.870

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed Oct 15 23:41:12 EDT 2003


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

Modified Files:
	NEWS 
Log Message:
* list.sort() now supports three keyword arguments:  cmp, key, and reverse.
  key provides C support for the decorate-sort-undecorate pattern.
  reverse provide a stable sort of the list with the comparisions reversed.

* Amended the docs to guarantee sort stability.



Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.869
retrieving revision 1.870
diff -C2 -d -r1.869 -r1.870
*** NEWS	12 Oct 2003 18:24:34 -0000	1.869
--- NEWS	16 Oct 2003 03:41:09 -0000	1.870
***************
*** 13,16 ****
--- 13,25 ----
  -----------------
  
+ - list.sort() now supports three keyword arguments:  cmp, key, and reverse.
+   The key argument can be a function of one argument that extracts a
+   comparison key from the original record:  mylist.sort(key=str.lower).
+   The reverse argument is a boolean value and if True will change the
+   sort order as if the comparison arguments were reversed.  In addition,
+   the documentation has been amended to provide a guarantee that all sorts
+   starting with Py2.3 are guaranteed to be stable (the relative order of
+   records with equal keys is unchanged).
+ 
  - Added test whether wchar_t is signed or not. A signed wchar_t is not
    usable as internal unicode type base for Py_UNICODE since the





More information about the Python-checkins mailing list