summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2024-03-15 02:40:36 (GMT)
committerGitHub <noreply@github.com>2024-03-15 02:40:36 (GMT)
commit41e844a4acbd5070f675e034e31c988b4849dec9 (patch)
tree6b1858078020a603754546c3ec24a506f9d6784e /Doc
parent1904f0a2245f500aa85fba347b260620350efc78 (diff)
downloadcpython-41e844a4acbd5070f675e034e31c988b4849dec9.zip
cpython-41e844a4acbd5070f675e034e31c988b4849dec9.tar.gz
cpython-41e844a4acbd5070f675e034e31c988b4849dec9.tar.bz2
gh-116842: Improve test comment and fix a doctest (gh-116846)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/itertools.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 7df8e80..b092efe 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -1417,7 +1417,7 @@ The following recipes have a more mathematical flavor:
[1, 4]
>>> # Verify faithfulness to type specific index() method behaviors.
- >>> # For example, bytes and str perform subsequence searches
+ >>> # For example, bytes and str perform continuous-subsequence searches
>>> # that do not match the general behavior specified
>>> # in collections.abc.Sequence.index().
>>> seq = 'abracadabra'
@@ -1568,7 +1568,7 @@ The following recipes have a more mathematical flavor:
>>> list(roundrobin('abc', 'd', 'ef'))
['a', 'd', 'e', 'b', 'f', 'c']
>>> ranges = [range(5, 1000), range(4, 3000), range(0), range(3, 2000), range(2, 5000), range(1, 3500)]
- >>> collections.Counter(roundrobin(ranges)) == collections.Counter(ranges)
+ >>> collections.Counter(roundrobin(*ranges)) == collections.Counter(chain(*ranges))
True
>>> # Verify that the inputs are consumed lazily
>>> input_iterators = list(map(iter, ['abcd', 'ef', '', 'ghijk', 'l', 'mnopqr']))