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 <brandtbuc...@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.

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SGR35UL4RUO4PU3HQXN3ZEUGK3577PY3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to