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

miss-islington webhook-mailer at python.org
Fri Sep 17 01:12:45 EDT 2021


https://github.com/python/cpython/commit/ed28b92e924b8a0ff403b64f567b65824117b891
commit: ed28b92e924b8a0ff403b64f567b65824117b891
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-09-16T22:12:37-07:00
summary:

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

(cherry picked from commit 80d9ff16483b6c1898bcdcc811b5450b57a5e573)

Co-authored-by: Raymond Hettinger <rhettinger at users.noreply.github.com>

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