Description
roundrobin
cpython/Doc/library/itertools.rst
Lines 1570 to 1571 in 5f52d20
That looks weird. Round-robin with a single iterable? And the ranges aren't iterated? I suspect this was intended:
collections.Counter(roundrobin(*ranges)) == collections.Counter(chain(*ranges))
unique_everseen
These could be lazier by yielding first (before updating seen
):
cpython/Doc/library/itertools.rst
Lines 894 to 895 in 7bbb9b5
cpython/Doc/library/itertools.rst
Lines 900 to 901 in 7bbb9b5
The similar "roughly equivalent" code of cycle
and the factor
recipe also yield as early as they can.
iter_index
cpython/Doc/library/itertools.rst
Line 1420 in 7bbb9b5
Not really subsequence searches but substring searches. For example, "fbr" is a subsequence of "foobar", but they don't search for that. See Subsequence and Substring at Wikipedia.