[Python-checkins] python/dist/src/Doc/whatsnew whatsnew22.tex,1.56,1.57

fdrake@sourceforge.net fdrake@sourceforge.net
Thu, 02 May 2002 10:55:28 -0700


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

Modified Files:
	whatsnew22.tex 
Log Message:
Many minor markup adjustments for consistency.

Index: whatsnew22.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew22.tex,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** whatsnew22.tex	10 Apr 2002 21:53:22 -0000	1.56
--- whatsnew22.tex	2 May 2002 17:55:26 -0000	1.57
***************
*** 522,528 ****
  own iterator, this method can just return \code{self}.  In particular,
  iterators will usually be their own iterators.  Extension types
! implemented in C can implement a \code{tp_iter} function in order to
  return an iterator, and extension types that want to behave as
! iterators can define a \code{tp_iternext} function.
  
  So, after all this, what do iterators actually do?  They have one
--- 522,528 ----
  own iterator, this method can just return \code{self}.  In particular,
  iterators will usually be their own iterators.  Extension types
! implemented in C can implement a \member{tp_iter} function in order to
  return an iterator, and extension types that want to behave as
! iterators can define a \member{tp_iternext} function.
  
  So, after all this, what do iterators actually do?  They have one
***************
*** 553,557 ****
  For backward compatibility and convenience, an iterator is
  automatically constructed for sequences that don't implement
! \method{__iter__()} or a \code{tp_iter} slot, so \code{for i in
  [1,2,3]} will still work.  Wherever the Python interpreter loops over
  a sequence, it's been changed to use the iterator protocol.  This
--- 553,557 ----
  For backward compatibility and convenience, an iterator is
  automatically constructed for sequences that don't implement
! \method{__iter__()} or a \member{tp_iter} slot, so \code{for i in
  [1,2,3]} will still work.  Wherever the Python interpreter loops over
  a sequence, it's been changed to use the iterator protocol.  This
***************
*** 660,668 ****
  \keyword{return} statement is that on reaching a \keyword{yield} the
  generator's state of execution is suspended and local variables are
! preserved.  On the next call to the generator's \code{.next()} method,
  the function will resume executing immediately after the
  \keyword{yield} statement.  (For complicated reasons, the
  \keyword{yield} statement isn't allowed inside the \keyword{try} block
! of a \code{try...finally} statement; read \pep{255} for a full
  explanation of the interaction between \keyword{yield} and
  exceptions.)
--- 660,668 ----
  \keyword{return} statement is that on reaching a \keyword{yield} the
  generator's state of execution is suspended and local variables are
! preserved.  On the next call to the generator's \code{next()} method,
  the function will resume executing immediately after the
  \keyword{yield} statement.  (For complicated reasons, the
  \keyword{yield} statement isn't allowed inside the \keyword{try} block
! of a \keyword{try}...\keyword{finally} statement; read \pep{255} for a full
  explanation of the interaction between \keyword{yield} and
  exceptions.)
***************
*** 864,868 ****
  \item Classes can define methods called \method{__truediv__} and
  \method{__floordiv__} to overload the two division operators.  At the
! C level, there are also slots in the \code{PyNumberMethods} structure
  so extension types can define the two operators.
  
--- 864,868 ----
  \item Classes can define methods called \method{__truediv__} and
  \method{__floordiv__} to overload the two division operators.  At the
! C level, there are also slots in the \ctype{PyNumberMethods} structure
  so extension types can define the two operators.
  
***************
*** 1132,1136 ****
    introduced in Python 2.1 to provide interactive help.
    \code{help(\var{object})} displays any available help text about
!   \var{object}.  \code{help()} with no argument puts you in an online
    help utility, where you can enter the names of functions, classes,
    or modules to read their help text.
--- 1132,1136 ----
    introduced in Python 2.1 to provide interactive help.
    \code{help(\var{object})} displays any available help text about
!   \var{object}.  \function{help()} with no argument puts you in an online
    help utility, where you can enter the names of functions, classes,
    or modules to read their help text.
***************
*** 1244,1248 ****
    presumably faster.  Instead of specifying a format string, the
    caller simply gives the minimum and maximum number of arguments
!   expected, and a set of pointers to \code{PyObject*} variables that
    will be filled in with argument values.  
  
--- 1244,1248 ----
    presumably faster.  Instead of specifying a format string, the
    caller simply gives the minimum and maximum number of arguments
!   expected, and a set of pointers to \ctype{PyObject*} variables that
    will be filled in with argument values.  
  
***************
*** 1359,1366 ****
    file APIs.  As MBCS is explicitly used by the file APIs, Python's
    choice of ASCII as the default encoding turns out to be an
!   annoyance.  On Unix, the locale's character set is used if
    \function{locale.nl_langinfo(CODESET)} is available.  (Windows
    support was contributed by Mark Hammond with assistance from
!   Marc-Andr\'e Lemburg. Unix support was added by Martin von L\"owis.)
  
    \item Large file support is now enabled on Windows.  (Contributed by
--- 1359,1366 ----
    file APIs.  As MBCS is explicitly used by the file APIs, Python's
    choice of ASCII as the default encoding turns out to be an
!   annoyance.  On \UNIX, the locale's character set is used if
    \function{locale.nl_langinfo(CODESET)} is available.  (Windows
    support was contributed by Mark Hammond with assistance from
!   Marc-Andr\'e Lemburg. \UNIX{} support was added by Martin von L\"owis.)
  
    \item Large file support is now enabled on Windows.  (Contributed by