Skip to content

Commit 8356c14

Browse files
authored
Remove uninformative itertools recipe (GH-100253)
1 parent b7e4f1d commit 8356c14

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Doc/library/itertools.rst

-7
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,6 @@ which incur interpreter overhead.
829829
"Count how many times the predicate is true"
830830
return sum(map(pred, iterable))
831831

832-
def pad_none(iterable):
833-
"Returns the sequence elements and then returns None indefinitely."
834-
return chain(iterable, repeat(None))
835-
836832
def ncycles(iterable, n):
837833
"Returns the sequence elements n times"
838834
return chain.from_iterable(repeat(tuple(iterable), n))
@@ -1193,9 +1189,6 @@ which incur interpreter overhead.
11931189
>>> take(5, map(int, repeatfunc(random.random)))
11941190
[0, 0, 0, 0, 0]
11951191

1196-
>>> list(islice(pad_none('abc'), 0, 6))
1197-
['a', 'b', 'c', None, None, None]
1198-
11991192
>>> list(ncycles('abc', 3))
12001193
['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']
12011194

0 commit comments

Comments
 (0)