[Python-checkins] python/dist/src/Lib/test test_itertools.py, 1.19,
1.20
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Sep 12 21:01:37 EDT 2003
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv1877
Modified Files:
test_itertools.py
Log Message:
Simplify doctest of tee().
Index: test_itertools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_itertools.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** test_itertools.py 8 Sep 2003 23:58:40 -0000 1.19
--- test_itertools.py 13 Sep 2003 01:01:34 -0000 1.20
***************
*** 608,620 ****
32
! >>> def irange(start, stop):
! ... for i in range(start, stop):
! ... yield i
!
! >>> x, y = tee(irange(2,10))
>>> list(x), list(y)
([2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9])
! >>> x, y = tee(irange(2,10))
>>> zip(x, y)
[(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)]
--- 608,616 ----
32
! >>> x, y = tee(chain(xrange(2,10)))
>>> list(x), list(y)
([2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9])
! >>> x, y = tee(chain(xrange(2,10)))
>>> zip(x, y)
[(2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)]
More information about the Python-checkins
mailing list