]> granicus.if.org Git - python/commitdiff
Remove duplicate recipe.
authorRaymond Hettinger <python@rcn.com>
Sat, 18 Apr 2009 23:58:45 +0000 (23:58 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 18 Apr 2009 23:58:45 +0000 (23:58 +0000)
Doc/library/itertools.rst

index 1861df44f5563f7cf96d153a7645221f2bed71dc..5b0574aeb333ae7dc2041962e19bd97157fd1c6f 100644 (file)
@@ -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)