diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-03-15 02:46:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 02:46:54 (GMT) |
commit | 37514111be04e148181a1f6f96f3b65db775cce7 (patch) | |
tree | aa2d7134bd5c56d53681ed01136952e3e5a4eac1 /Doc | |
parent | e4ec4459265f9d4b947abd82c82466b569db21a4 (diff) | |
download | cpython-37514111be04e148181a1f6f96f3b65db775cce7.zip cpython-37514111be04e148181a1f6f96f3b65db775cce7.tar.gz cpython-37514111be04e148181a1f6f96f3b65db775cce7.tar.bz2 |
[3.12] gh-116842: Improve test comment and fix a doctest (gh-116846) (gh-116847)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/itertools.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index e36ba8e..09e04a3 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -1405,7 +1405,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' @@ -1556,7 +1556,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'])) |