On Mon, 20 Apr 2020 12:39:05 -0700 Andrew Barnert via Python-ideas <python-ideas@python.org> wrote:
On Apr 20, 2020, at 11:25, Brandt Bucher <brandtbucher@gmail.com> wrote:
I disagree. In my own personal experience, ~80% of the time when I use `zip` there is an assumption that all of the iterables are the same length.
Sure, but I think cases where you want that assumption _checked_ are a lot less common.
Depends what you call "want". In most cases, the implemented logic should indeed ensure that the iterables are the same length. However, implemented logic can be buggy and it's always good to not let errors pass silently. Currently, zip() will ignore data silently if one iterable is longer than the other. Of course, the fact that zip() is the shorter form that everyone is used to means that, even if a `strict` argument is added, few people will bother adding it. Regards Antoine.