[Python-checkins] [3.11] Remove uninformative itertools recipe (GH-100253) (GH-100275)

rhettinger webhook-mailer at python.org
Thu Dec 15 13:48:04 EST 2022


https://github.com/python/cpython/commit/9d2dcbbccdf4207249665b58c8bd28430c4f7afd
commit: 9d2dcbbccdf4207249665b58c8bd28430c4f7afd
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2022-12-15T12:47:58-06:00
summary:

[3.11] Remove uninformative itertools recipe (GH-100253) (GH-100275)

files:
M Doc/library/itertools.rst

diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 3d93c2c0573e..ee70b16f42fb 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -790,10 +790,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))
@@ -1163,9 +1159,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']
 



More information about the Python-checkins mailing list