[Python-ideas] zip() problem.

Andrew Barnert abarnert at yahoo.com
Fri Feb 12 19:09:24 EST 2016


On Feb 12, 2016, at 15:51, Michael Selik <mike at selik.org> wrote:
> 
> BTW, from the documentation (https://docs.python.org/3/library/functions.html#zip):
> 
> "zip() should only be used with unequal length inputs when you don’t care about trailing, unmatched values from the longer iterables. If those values are important, useitertools.zip_longest() instead."

I think what's missing (from his point of view) is some statement that if you call it with iterators, it's not just the trailing values, but also the iterators' states that you shouldn't care about.

I always took that as read without it needing to be stated. But maybe it does need stating?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160212/73d5c5aa/attachment.html>


More information about the Python-ideas mailing list