Skip to content

Commit ed28b92

Browse files
Fix typo and add a module prefix (GH-28401)
(cherry picked from commit 80d9ff1) Co-authored-by: Raymond Hettinger <[email protected]>
1 parent f798cef commit ed28b92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/itertools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,14 +821,14 @@ which incur interpreter overhead.
821821
822822
def triplewise(iterable):
823823
"Return overlapping triplets from an iterable"
824-
# pairwise('ABCDEFG') -> ABC BCD CDE DEF EFG
824+
# triplewise('ABCDEFG') -> ABC BCD CDE DEF EFG
825825
for (a, _), (b, c) in pairwise(pairwise(iterable)):
826826
yield a, b, c
827827

828828
def sliding_window(iterable, n):
829829
# sliding_window('ABCDEFG', 4) -> ABCD BCDE CDEF DEFG
830830
it = iter(iterable)
831-
window = deque(islice(it, n), maxlen=n)
831+
window = collections.deque(islice(it, n), maxlen=n)
832832
if len(window) == n:
833833
yield tuple(window)
834834
for x in it:

0 commit comments

Comments
 (0)