[Python-checkins] python/dist/src/Doc/tut tut.tex,1.222,1.223

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Thu Feb 12 09:35:21 EST 2004


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8759

Modified Files:
	tut.tex 
Log Message:
fix minor markup error: \code{for} --> \keyword{for}


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.222
retrieving revision 1.223
diff -C2 -d -r1.222 -r1.223
*** tut.tex	12 Feb 2004 09:50:42 -0000	1.222
--- tut.tex	12 Feb 2004 14:35:18 -0000	1.223
***************
*** 4287,4291 ****
  
  By now, you've probably noticed that most container objects can be looped
! over using a \code{for} statement:
  
  \begin{verbatim}
--- 4287,4291 ----
  
  By now, you've probably noticed that most container objects can be looped
! over using a \keyword{for} statement:
  
  \begin{verbatim}
***************
*** 4303,4311 ****
  
  This style of access is clear, concise, and convenient.  The use of iterators
! pervades and unifies Python.  Behind the scenes, the \code{for} statement calls
! \function{iter()} on the container object.  The function returns an iterator
! object that defines the method \method{next()} which accesses elements in the
! container one at a time.  When there are no more elements, \method{next()}
! raises a \exception{StopIteration} exception which tells the \code{for} loop
  to terminate.  This example shows how it all works:
  
--- 4303,4312 ----
  
  This style of access is clear, concise, and convenient.  The use of iterators
! pervades and unifies Python.  Behind the scenes, the \keyword{for}
! statement calls \function{iter()} on the container object.  The
! function returns an iterator object that defines the method
! \method{next()} which accesses elements in the container one at a
! time.  When there are no more elements, \method{next()} raises a
! \exception{StopIteration} exception which tells the \keyword{for} loop
  to terminate.  This example shows how it all works:
  




More information about the Python-checkins mailing list