]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Minor stylistic edit to the grouper recipe (gh-112759) (gh-113196)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 15 Dec 2023 22:32:32 +0000 (23:32 +0100)
committerGitHub <noreply@github.com>
Fri, 15 Dec 2023 22:32:32 +0000 (16:32 -0600)
Doc/library/itertools.rst

index 15b449d650512acc5942d9c3b6ab837f3a0f56da..fc25e51678ac698f70ef82a8d962bbf0a37e8020 100644 (file)
@@ -916,9 +916,9 @@ which incur interpreter overhead.
        args = [iter(iterable)] * n
        if incomplete == 'fill':
            return zip_longest(*args, fillvalue=fillvalue)
-       if incomplete == 'strict':
+       elif incomplete == 'strict':
            return zip(*args, strict=True)
-       if incomplete == 'ignore':
+       elif incomplete == 'ignore':
            return zip(*args)
        else:
            raise ValueError('Expected fill, strict, or ignore')