[Python-checkins]
python/dist/src/Doc/whatsnew whatsnew24.tex, 1.22, 1.23
akuchling at users.sourceforge.net
akuchling at users.sourceforge.net
Thu Jan 1 13:33:37 EST 2004
Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory sc8-pr-cvs1:/tmp/cvs-serv14149
Modified Files:
whatsnew24.tex
Log Message:
Use 'input' as variable name, even though it shadows a built-in
Remove applications of rsplit() and random numbers
Typo fixes; minor tweaks
Index: whatsnew24.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** whatsnew24.tex 31 Dec 2003 01:59:18 -0000 1.22
--- whatsnew24.tex 1 Jan 2004 18:33:34 -0000 1.23
***************
*** 110,115 ****
\begin{verbatim}
! >>> data = open('/etc/passwd', 'r')
! >>> for line in reversed(list(data)):
... print line
...
--- 110,115 ----
\begin{verbatim}
! >>> input= open('/etc/passwd', 'r')
! >>> for line in reversed(list(input)):
... print line
...
***************
*** 138,143 ****
\item Strings also gained an \method{rsplit()} method that
works like the \method{split()} method but splits from the end of
! the string. Possible applications include splitting a filename
! from a path or a domain name from URL.
\begin{verbatim}
--- 138,142 ----
\item Strings also gained an \method{rsplit()} method that
works like the \method{split()} method but splits from the end of
! the string.
\begin{verbatim}
***************
*** 237,241 ****
\item The \function{zip()} built-in function and \function{itertools.izip()}
now return an empty list instead of raising a \exception{TypeError}
! exception if called with no arguments. This makes the function more
suitable for use with variable length argument lists:
--- 236,240 ----
\item The \function{zip()} built-in function and \function{itertools.izip()}
now return an empty list instead of raising a \exception{TypeError}
! exception if called with no arguments. This makes them more
suitable for use with variable length argument lists:
***************
*** 355,361 ****
Note that \function{tee()} has to keep copies of the values returned
by the iterator; in the worst case, it may need to keep all of them.
! This should therefore be used carefully if there the leading iterator
can run far ahead of the trailing iterator in a long stream of inputs.
! If the separation is large, then it becomes preferrable to use
\function{list()} instead. When the iterators track closely with one
another, \function{tee()} is ideal. Possible applications include
--- 354,360 ----
Note that \function{tee()} has to keep copies of the values returned
by the iterator; in the worst case, it may need to keep all of them.
! This should therefore be used carefully if the leading iterator
can run far ahead of the trailing iterator in a long stream of inputs.
! If the separation is large, then it becomes preferable to use
\function{list()} instead. When the iterators track closely with one
another, \function{tee()} is ideal. Possible applications include
***************
*** 386,391 ****
which returns an N-bit long integer. This method supports the existing
\method{randrange()} method, making it possible to efficiently generate
! arbitrarily large random numbers (suitable for prime number generation in
! RSA applications for example).
\item The regular expression language accepted by the \module{re} module
--- 385,389 ----
which returns an N-bit long integer. This method supports the existing
\method{randrange()} method, making it possible to efficiently generate
! arbitrarily large random numbers.
\item The regular expression language accepted by the \module{re} module
More information about the Python-checkins
mailing list