[issue40353] Add an optional "strict" check to zip

Brandt Bucher report at bugs.python.org
Tue Apr 21 12:32:58 EDT 2020


New submission from Brandt Bucher <brandtbucher at gmail.com>:

As discussed on Python-ideas:

https://mail.python.org/archives/list/python-ideas@python.org/thread/6GFUADSQ5JTF7W7OGWF7XF2NH2XUTUQM/

When a keyword-only argument "strict=True" is passed to zip's constructor, a ValueError will be raised in the case where one iterator is exhausted before the others. Otherwise, no side-effects (such as iterator consumption) will be changed.

I do wonder if we can use a better keyword than "strict" here.

I'm currently working on an implementation, and @cool-RR is working on tests and docs.

----------
assignee: brandtbucher
components: Interpreter Core
messages: 366926
nosy: brandtbucher, cool-RR
priority: normal
severity: normal
status: open
title: Add an optional "strict" check to zip
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40353>
_______________________________________


More information about the Python-bugs-list mailing list