From fd2405415bb8adc656abcccae350f879647ab729 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 18 Apr 2009 23:58:45 +0000 Subject: [PATCH] Remove duplicate recipe. --- Doc/library/itertools.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 1861df44f55..5b0574aeb33 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -702,11 +702,6 @@ which incur interpreter overhead. pending -= 1 nexts = cycle(islice(nexts, pending)) - def powerset(iterable): - "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)" - s = list(iterable) - return chain.from_iterable(combinations(s, r) for r in range(len(s)+1)) - def compress(data, selectors): "compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F" return (d for d, s in izip(data, selectors) if s)