From: Raymond Hettinger Date: Fri, 17 Sep 2021 04:49:41 +0000 (-0500) Subject: Fix typo and add a module prefix (GH-28401) X-Git-Tag: v3.11.0a1~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80d9ff16483b6c1898bcdcc811b5450b57a5e573;p=thirdparty%2FPython%2Fcpython.git Fix typo and add a module prefix (GH-28401) --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index bf60a0cee795..ac6b354138b6 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -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: