[Python-checkins] r71735 - python/branches/release26-maint/Doc/library/itertools.rst

raymond.hettinger python-checkins at python.org
Sun Apr 19 01:58:45 CEST 2009


Author: raymond.hettinger
Date: Sun Apr 19 01:58:45 2009
New Revision: 71735
Log:
Remove duplicate recipe.
Modified:
 python/branches/release26-maint/Doc/library/itertools.rst
Modified: python/branches/release26-maint/Doc/library/itertools.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/itertools.rst	(original)
+++ python/branches/release26-maint/Doc/library/itertools.rst	Sun Apr 19 01:58:45 2009
@@ -702,11 +702,6 @@
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /