[Python-checkins] Fix typo and add a module prefix (GH-28401)

rhettinger webhook-mailer at python.org
Fri Sep 17 00:49:50 EDT 2021


https://github.com/python/cpython/commit/80d9ff16483b6c1898bcdcc811b5450b57a5e573
commit: 80d9ff16483b6c1898bcdcc811b5450b57a5e573
branch: main
author: Raymond Hettinger <rhettinger at users.noreply.github.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2021-09-16T23:49:41-05:00
summary:

Fix typo and add a module prefix (GH-28401)

files:
M Doc/library/itertools.rst

diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index bf60a0cee795f..ac6b354138b6e 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:



More information about the Python-checkins mailing list