]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor stylistic edit to the grouper recipe (gh112759)
authorJurjen N. E. Bos <jneb@users.noreply.github.com>
Tue, 5 Dec 2023 18:44:06 +0000 (19:44 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 18:44:06 +0000 (12:44 -0600)
Doc/library/itertools.rst

index ebb4ebcfa7618a1e546b8551cea3e2b48282a23d..8a4254cf15ebe29dd3057894fb7860238cae7fbd 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')