]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116842: Improve test comment and fix a doctest (gh-116846)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 15 Mar 2024 02:40:36 +0000 (21:40 -0500)
committerGitHub <noreply@github.com>
Fri, 15 Mar 2024 02:40:36 +0000 (21:40 -0500)
Doc/library/itertools.rst

index 7df8e804507ef53b06f82c9f0a3dc9905a60f352..b092efe0dc362b0408cd410df42e002df4e8255d 100644 (file)
@@ -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']))