summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2022-12-15 18:39:01 (GMT)
committerGitHub <noreply@github.com>2022-12-15 18:39:01 (GMT)
commit8356c14b4f81f4d0010afb61610edacf4068b804 (patch)
tree82fee356171daaa1b61e45c3a687557ff521a46f
parentb7e4f1d97c6e784d2dee182d2b81541ddcff5751 (diff)
downloadcpython-8356c14b4f81f4d0010afb61610edacf4068b804.zip
cpython-8356c14b4f81f4d0010afb61610edacf4068b804.tar.gz
cpython-8356c14b4f81f4d0010afb61610edacf4068b804.tar.bz2
Remove uninformative itertools recipe (GH-100253)
-rw-r--r--Doc/library/itertools.rst7
1 files changed, 0 insertions, 7 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 624d243..9146ed1 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -829,10 +829,6 @@ which incur interpreter overhead.
"Count how many times the predicate is true"
return sum(map(pred, iterable))
- def pad_none(iterable):
- "Returns the sequence elements and then returns None indefinitely."
- return chain(iterable, repeat(None))
-
def ncycles(iterable, n):
"Returns the sequence elements n times"
return chain.from_iterable(repeat(tuple(iterable), n))
@@ -1193,9 +1189,6 @@ which incur interpreter overhead.
>>> take(5, map(int, repeatfunc(random.random)))
[0, 0, 0, 0, 0]
- >>> list(islice(pad_none('abc'), 0, 6))
- ['a', 'b', 'c', None, None, None]
-
>>> list(ncycles('abc', 3))
['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']