[Python-checkins] python/dist/src/Doc/whatsnew whatsnew23.tex,1.43,1.44

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Wed, 14 Aug 2002 17:40:23 -0700


Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory usw-pr-cvs1:/tmp/cvs-serv31401

Modified Files:
	whatsnew23.tex 
Log Message:
Add 'in' change
Revise sentence
Add two reminders


Index: whatsnew23.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew23.tex,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** whatsnew23.tex	6 Aug 2002 01:40:48 -0000	1.43
--- whatsnew23.tex	15 Aug 2002 00:40:21 -0000	1.44
***************
*** 16,19 ****
--- 16,23 ----
  %
  % New sorting code
+ %
+ % Karatsuba multiplication for long ints (#560379)
+ %
+ % xreadlines obsolete; files are their own iterator
  
  %\section{Introduction \label{intro}}
***************
*** 481,487 ****
  \end{verbatim}
  
! From this example you can also see that the builtin ``\var{slice}''
! object is now the type of slice objects, not a function (so is now
! consistent with \var{int}, \var{str}, etc from 2.2).
  
  %======================================================================
--- 485,493 ----
  \end{verbatim}
  
! From this example you can also see that the builtin ``\class{slice}''
! object is now the type object for the slice type, and is no longer a
! function.  This is consistent with Python 2.2, where \class{int},
! \class{str}, etc., underwent the same change.
! 
  
  %======================================================================
***************
*** 494,497 ****
--- 500,523 ----
  \item The \keyword{yield} statement is now always a keyword, as
  described in section~\ref{section-generators} of this document.
+ 
+ \item The \code{in} operator now works differently for strings.
+ Previously, when evaluating \code{\var{X} in \var{Y}} where \var{X}
+ and \var{Y} are strings, \var{X} could only be a single character.
+ That's now changed; \var{X} can be a string of any length, and
+ \code{\var{X} in \var{Y}} will return \constant{True} if \var{X} is a
+ substring of \var{Y}.  If \var{X} is the empty string, the result is
+ always \constant{True}.
+ 
+ \begin{verbatim}
+ >>> 'ab' in 'abcd'
+ True
+ >>> 'ad' in 'abcd'
+ False
+ >>> '' in 'abcd'
+ True
+ \end{verbatim}
+ 
+ Note that this doesn't tell you where the substring starts; the
+ \method{find()} method is still necessary to figure that out.
  
  \item A new built-in function \function{enumerate()}