On 4/20/2020 3:39 PM, Andrew Barnert via Python-ideas 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. There are lots of postconditions that you assume just as often as “x, y, and z are fully consumed” and just as rarely want to check, so we don’t need to make it easy to check every possible one of them.
As I said, wanting to check does come up sometimes—I know I have written this myself at least once, and I’d be a little surprised if it’s not in more-itertools.
Interestingly, it looks like it it might be more_itertools.zip_equal, which is listed at https://github.com/more-itertools/more-itertools, but is linked to https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.zip_... which is missing. Maybe it's new? Eric