[Python-checkins] python/dist/src/Modules itertoolsmodule.c,1.16,1.17
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Wed, 18 Jun 2003 12:25:39 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv15836/Modules
Modified Files:
itertoolsmodule.c
Log Message:
Minor updates:
* Updated comment on design of imap()
* Added untraversed object in izip() structure
* Replaced the pairwise() example with a more general window() example
Index: itertoolsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/itertoolsmodule.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** itertoolsmodule.c 17 Jun 2003 23:14:40 -0000 1.16
--- itertoolsmodule.c 18 Jun 2003 19:25:34 -0000 1.17
***************
*** 883,887 ****
4) If a need does arise, it can be met by __builtins__.map() or by
! writing a generator.
5) Similar toolsets in Haskell and SML do not have automatic None fill-in.
--- 883,887 ----
4) If a need does arise, it can be met by __builtins__.map() or by
! writing: chain(iterable, repeat(None)).
5) Similar toolsets in Haskell and SML do not have automatic None fill-in.
***************
*** 1575,1580 ****
izip_traverse(izipobject *lz, visitproc visit, void *arg)
{
! if (lz->ittuple)
! return visit(lz->ittuple, arg);
return 0;
}
--- 1575,1590 ----
izip_traverse(izipobject *lz, visitproc visit, void *arg)
{
! int err;
!
! if (lz->ittuple) {
! err = visit(lz->ittuple, arg);
! if (err)
! return err;
! }
! if (lz->result) {
! err = visit(lz->result, arg);
! if (err)
! return err;
! }
return 0;
}