]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use correct indentation.
authorGeorg Brandl <georg@python.org>
Wed, 23 Jul 2008 16:00:44 +0000 (16:00 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 23 Jul 2008 16:00:44 +0000 (16:00 +0000)
Doc/library/itertools.rst

index 3cef985762f5157b82df12d09fb27793493e9664..5d3593e52cacb08c660c9efdf39c71b249bb7301 100644 (file)
@@ -675,17 +675,17 @@ which incur interpreter overhead.
        filtered =  ifilter(operator.itemgetter(1), decorated)
        return imap(operator.itemgetter(0), filtered)
 
-    def combinations_with_replacement(iterable, r):
-        "combinations_with_replacement('ABC', 3) --> AA AB AC BB BC CC"
-        pool = tuple(iterable)
-        n = len(pool)
-        indices = [0] * r
-        yield tuple(pool[i] for i in indices)
-        while 1:
-            for i in reversed(range(r)):
-                if indices[i] != n - 1:
-                    break
-            else:
-                return
-            indices[i:] = [indices[i] + 1] * (r - i)
-            yield tuple(pool[i] for i in indices)
+   def combinations_with_replacement(iterable, r):
+       "combinations_with_replacement('ABC', 3) --> AA AB AC BB BC CC"
+       pool = tuple(iterable)
+       n = len(pool)
+       indices = [0] * r
+       yield tuple(pool[i] for i in indices)
+       while 1:
+           for i in reversed(range(r)):
+               if indices[i] != n - 1:
+                   break
+           else:
+               return
+           indices[i:] = [indices[i] + 1] * (r - i)
+           yield tuple(pool[i] for i in indices)