From 992bfde5642cad175f86ccb96735cf2dcb8949ee Mon Sep 17 00:00:00 2001 From: "Jurjen N. E. Bos" Date: Tue, 5 Dec 2023 16:17:09 +0100 Subject: [PATCH] Update itertools.rst The recipe for "grouper" has a minor bug where the "incomplete" argument wasn't checked properly --- Doc/library/itertools.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index ebb4ebcfa7618a..8a4254cf15ebe2 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -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')