Skip to content

Commit

Permalink
[3.12] pythongh-116842: Improve test comment and fix a doctest (pytho…
Browse files Browse the repository at this point in the history
  • Loading branch information
miss-islington authored Mar 15, 2024
1 parent e4ec445 commit 3751411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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']))
Expand Down

0 comments on commit 3751411

Please sign in to comment.