[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex,1.115,1.116

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Thu, 02 Jan 2003 12:51:37 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv5845/Doc/lib

Modified Files:
	libstdtypes.tex 
Log Message:
Allow list sort's comparison function to explicitly be None.  See SF patch
661092.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** libstdtypes.tex	29 Dec 2002 05:49:09 -0000	1.115
--- libstdtypes.tex	2 Jan 2003 20:51:03 -0000	1.116
***************
*** 926,930 ****
    \lineiii{\var{s}.reverse()}
  	{reverses the items of \var{s} in place}{(6)}
!   \lineiii{\var{s}.sort(\optional{\var{cmpfunc}})}
  	{sort the items of \var{s} in place}{(6), (7), (8), (9)}
  \end{tableiii}
--- 926,930 ----
    \lineiii{\var{s}.reverse()}
  	{reverses the items of \var{s} in place}{(6)}
!   \lineiii{\var{s}.sort(\optional{\var{cmpfunc=None}})}
  	{sort the items of \var{s} in place}{(6), (7), (8), (9)}
  \end{tableiii}
***************
*** 971,978 ****
    than the second argument.  Note that this slows the sorting process
    down considerably; e.g. to sort a list in reverse order it is much
!   faster to call method \method{sort()} followed by
!   \method{reverse()} than to use method
!   \method{sort()} with a comparison function that reverses the
!   ordering of the elements.
  
  \item[(8)] Whether the \method{sort()} method is stable is not defined by
--- 971,979 ----
    than the second argument.  Note that this slows the sorting process
    down considerably; e.g. to sort a list in reverse order it is much
!   faster to call method \method{sort()} followed by \method{reverse()}
!   than to use method \method{sort()} with a comparison function that
!   reverses the ordering of the elements.  Passing \constant{None} as the
!   comparison function is semantically equivalent to calling
!   \method{sort()} with no comparison function.
  
  \item[(8)] Whether the \method{sort()} method is stable is not defined by