[Python-checkins] python/dist/src/Doc/tut tut.tex, 1.196.8.16, 1.196.8.17

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Thu Feb 12 09:34:44 EST 2004


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

Modified Files:
      Tag: release23-maint
	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.196.8.16
retrieving revision 1.196.8.17
diff -C2 -d -r1.196.8.16 -r1.196.8.17
*** tut.tex	12 Feb 2004 09:52:43 -0000	1.196.8.16
--- tut.tex	12 Feb 2004 14:34:42 -0000	1.196.8.17
***************
*** 4221,4225 ****
  
  By now, you've probably noticed that most container objects can be looped
! over using a \code{for} statement:
  
  \begin{verbatim}
--- 4221,4225 ----
  
  By now, you've probably noticed that most container objects can be looped
! over using a \keyword{for} statement:
  
  \begin{verbatim}
***************
*** 4237,4245 ****
  
  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:
  
--- 4237,4246 ----
  
  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