]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typo and add a module prefix (GH-28401)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 17 Sep 2021 04:49:41 +0000 (23:49 -0500)
committerGitHub <noreply@github.com>
Fri, 17 Sep 2021 04:49:41 +0000 (23:49 -0500)
Doc/library/itertools.rst

index bf60a0cee795f40cebc08cf0406daf491b9cd626..ac6b354138b6e243ebc69e7ccb80cf6fbff0b60b 100644 (file)
@@ -821,14 +821,14 @@ which incur interpreter overhead.
 
    def triplewise(iterable):
        "Return overlapping triplets from an iterable"
-       # pairwise('ABCDEFG') -> ABC BCD CDE DEF EFG
+       # triplewise('ABCDEFG') -> ABC BCD CDE DEF EFG
        for (a, _), (b, c) in pairwise(pairwise(iterable)):
            yield a, b, c
 
    def sliding_window(iterable, n):
        # sliding_window('ABCDEFG', 4) -> ABCD BCDE CDEF DEFG
        it = iter(iterable)
-       window = deque(islice(it, n), maxlen=n)
+       window = collections.deque(islice(it, n), maxlen=n)
        if len(window) == n:
            yield tuple(window)
        for x in it: