From 87f1874033413dbab8ebc76455df2ce6e9e35716 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 15 Dec 2022 20:39:01 +0200 Subject: [PATCH] Remove uninformative itertools recipe (GH-100253) (cherry picked from commit 8356c14b4f81f4d0010afb61610edacf4068b804) Co-authored-by: Raymond Hettinger --- Doc/library/itertools.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 3d93c2c0573e09..ee70b16f42fbb9 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'] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy