[Python-checkins] python/nondist/sandbox/itertools libitertools.tex,1.18,1.19

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Thu, 30 Jan 2003 09:08:03 -0800


Update of /cvsroot/python/python/nondist/sandbox/itertools
In directory sc8-pr-cvs1:/tmp/cvs-serv17703

Modified Files:
	libitertools.tex 
Log Message:
Review comments from Paul Moore.

Index: libitertools.tex
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/itertools/libitertools.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** libitertools.tex	30 Jan 2003 04:16:43 -0000	1.18
--- libitertools.tex	30 Jan 2003 17:07:59 -0000	1.19
***************
*** 72,78 ****
  \begin{funcdesc}{count}{\optional{n}}
    Make an iterator that returns consecutive integers starting with \var{n}.
!   Often used as a argument to \function{imap()} to generate consecutive
!   data points.  Also, used in \function{izip()} to add sequence numbers.
!   Equivalent to:
  
    \begin{verbatim}
--- 72,78 ----
  \begin{funcdesc}{count}{\optional{n}}
    Make an iterator that returns consecutive integers starting with \var{n}.
!   Does not currently support python long integers.  Often used as an
!   argument to \function{imap()} to generate consecutive data points.
!   Also, used in \function{izip()} to add sequence numbers.  Equivalent to:
  
    \begin{verbatim}
***************
*** 87,92 ****
  \begin{funcdesc}{dropwhile}{predicate, iterable}
    Make an iterator that drops elements from the iterable as long as
!   the predicate is true; afterwards, returns every element.
!   Equivalent to:
  
    \begin{verbatim}
--- 87,93 ----
  \begin{funcdesc}{dropwhile}{predicate, iterable}
    Make an iterator that drops elements from the iterable as long as
!   the predicate is true; afterwards, returns every element.  Note,
!   the iterator does not produce \emph{any} output until the predicate
!   is true, so it may have a lengthy start-up time.  Equivalent to:
  
    \begin{verbatim}
***************
*** 105,111 ****
  \begin{funcdesc}{ifilter}{predicate, iterable \optional{, invert}}
    Make an iterator that filters elements from iterable returning only
!   those for which the predicate function evaluates to \code{True}.  If
    \var{invert} is \code{True}, then reverse the process and pass through
!   only those elements for which the function evaluates to \code{False}.
    If \var{predicate} is \code{None}, return the items that are true
    (or false if \var{invert} has been set).  Equivalent to:
--- 106,112 ----
  \begin{funcdesc}{ifilter}{predicate, iterable \optional{, invert}}
    Make an iterator that filters elements from iterable returning only
!   those for which the predicate is \code{True}.  If
    \var{invert} is \code{True}, then reverse the process and pass through
!   only those elements for which the predicate is \code{False}.
    If \var{predicate} is \code{None}, return the items that are true
    (or false if \var{invert} has been set).  Equivalent to:
***************
*** 300,305 ****
  \end{verbatim}
  
! As a further example of how itertools can be combined, here
! are a few ways to define higher level tools:
  
  \begin{verbatim}
--- 301,309 ----
  \end{verbatim}
  
! This section has further examples of how itertools can be combined.
! Note that \function{enumerate()} and \method{iteritems()} already
! have highly efficient implementations in Python.  They are only
! included here to illustrate how higher level tools can be created
! from building blocks.
  
  \begin{verbatim}