[Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.83, 1.84

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Sat Aug 7 15:24:14 CEST 2004


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

Modified Files:
	whatsnew24.tex 
Log Message:
Simplify language

Index: whatsnew24.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew24.tex,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** whatsnew24.tex	7 Aug 2004 13:13:31 -0000	1.83
--- whatsnew24.tex	7 Aug 2004 13:24:12 -0000	1.84
***************
*** 120,133 ****
  \section{PEP 289: Generator Expressions}
  
! The iterator feature introduced in Python 2.2 makes it easier to write
! programs that loop through large data sets without having the entire
! data set in memory at one time.  Programmers can use iterators and the
! \module{itertools} module to write code in a fairly functional style.
! 
! % XXX avoid metaphor
! List comprehensions have been the fly in the ointment because they
! produce a Python list object containing all of the items, unavoidably
! pulling them all into memory.  When trying to write a
! functionally-styled program, it would be natural to write something
  like:
  
--- 120,130 ----
  \section{PEP 289: Generator Expressions}
  
! The iterator feature introduced in Python 2.2 and the
! \module{itertools} module make it easier to write programs that loop
! through large data sets without having the entire data set in memory
! at one time.  List comprehensions don't fit into this picture very
! well because they produce a Python list object containing all of the
! items, unavoidably pulling them all into memory.  When trying to write
! a functionally-styled program, it would be natural to write something
  like:
  
***************
*** 149,153 ****
  The first form is more concise and perhaps more readable, but if
  you're dealing with a large number of link objects the second form
! would have to be used.
  
  Generator expressions work similarly to list comprehensions but don't
--- 146,151 ----
  The first form is more concise and perhaps more readable, but if
  you're dealing with a large number of link objects the second form
! would have to be used to avoid having all link objects in memory at
! the same time.
  
  Generator expressions work similarly to list comprehensions but don't



More information about the Python-checkins mailing list