diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2021-09-17 04:49:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 04:49:41 (GMT) |
commit | 80d9ff16483b6c1898bcdcc811b5450b57a5e573 (patch) | |
tree | 582888714468513ed597d575c9b8b4ee1b30f955 | |
parent | fdc6b3d9316501d2f0068a1bf4334debc1949e62 (diff) | |
download | cpython-80d9ff16483b6c1898bcdcc811b5450b57a5e573.zip cpython-80d9ff16483b6c1898bcdcc811b5450b57a5e573.tar.gz cpython-80d9ff16483b6c1898bcdcc811b5450b57a5e573.tar.bz2 |
Fix typo and add a module prefix (GH-28401)
-rw-r--r-- | Doc/library/itertools.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index bf60a0c..ac6b354 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: |