[Python-checkins] python/dist/src/Doc/whatsnew whatsnew22.tex,1.54,1.54.2.1
fdrake@sourceforge.net
fdrake@sourceforge.net
Thu, 02 May 2002 10:56:19 -0700
Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory usw-pr-cvs1:/tmp/cvs-serv5558/whatsnew
Modified Files:
Tag: release22-maint
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.54
retrieving revision 1.54.2.1
diff -C2 -d -r1.54 -r1.54.2.1
*** whatsnew22.tex 21 Dec 2001 04:39:11 -0000 1.54
--- whatsnew22.tex 2 May 2002 17:56:17 -0000 1.54.2.1
***************
*** 521,527 ****
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
--- 521,527 ----
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
***************
*** 552,556 ****
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
--- 552,556 ----
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
***************
*** 659,667 ****
\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.)
--- 659,667 ----
\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.)
***************
*** 863,867 ****
\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.
--- 863,867 ----
\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.
***************
*** 1131,1135 ****
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.
--- 1131,1135 ----
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.
***************
*** 1243,1247 ****
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.
--- 1243,1247 ----
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.
***************
*** 1356,1363 ****
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
--- 1356,1363 ----
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