On 4/20/2020 3:39 PM, Andrew Barnert via Python-ideas 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. 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_equal
which is missing. Maybe it's new?
Eric
_______________________________________________
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/5467G4LYCYSAUAMM6BWCOUERFACLPZGJ/
Code of Conduct: http://python.org/psf/codeofconduct/