[Python-checkins] python/dist/src/Doc/lib libitertools.tex, 1.12.6.6, 1.12.6.7

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Mon Oct 20 16:45:35 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv25729

Modified Files:
      Tag: release23-maint
	libitertools.tex 
Log Message:
Backport 1.19:  
  
   Use 'predicate = bool' as the default predicate for ifilter[false].



Index: libitertools.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libitertools.tex,v
retrieving revision 1.12.6.6
retrieving revision 1.12.6.7
diff -C2 -d -r1.12.6.6 -r1.12.6.7
*** libitertools.tex	5 Oct 2003 23:05:56 -0000	1.12.6.6
--- libitertools.tex	20 Oct 2003 20:45:33 -0000	1.12.6.7
***************
*** 141,146 ****
       def ifilter(predicate, iterable):
           if predicate is None:
!              def predicate(x):
!                  return x
           for x in iterable:
               if predicate(x):
--- 141,145 ----
       def ifilter(predicate, iterable):
           if predicate is None:
!              predicate = bool
           for x in iterable:
               if predicate(x):
***************
*** 158,163 ****
       def ifilterfalse(predicate, iterable):
           if predicate is None:
!              def predicate(x):
!                  return x
           for x in iterable:
               if not predicate(x):
--- 157,161 ----
       def ifilterfalse(predicate, iterable):
           if predicate is None:
!              predicate = bool
           for x in iterable:
               if not predicate(x):





More information about the Python-checkins mailing list