summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-13 01:01:34 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-13 01:01:34 (GMT)
commit42a61ed277ee2bfaa19952c470a43d288be11ae6 (patch)
tree7035a3421530835dfc3253ff5aa80cef6c186e60 /Lib
parentcbe81f2a722d3f7435e038b66aa4a3bb5a727ef4 (diff)
downloadcpython-42a61ed277ee2bfaa19952c470a43d288be11ae6.zip
cpython-42a61ed277ee2bfaa19952c470a43d288be11ae6.tar.gz
cpython-42a61ed277ee2bfaa19952c470a43d288be11ae6.tar.bz2
Simplify doctest of tee().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_itertools.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 8ab4cea..7842dd3 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -607,15 +607,11 @@ False
>>> dotproduct([1,2,3], [4,5,6])
32
->>> def irange(start, stop):
-... for i in range(start, stop):
-... yield i
-
->>> x, y = tee(irange(2,10))
+>>> 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(irange(2,10))
+>>> 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)]