On 02Jun2020 1430, David Mertz wrote:
On Tue, Jun 2, 2020 at 8:07 AM Chris Angelico <ros...@gmail.com <mailto:ros...@gmail.com>> wrote:

     > Given that the only input parameters are the iterables
    themselves, it's a stretch to even consider the first two as
    possibilities.

    Why? I can conceivably imagine that zip(iter1, iter2, truncate=5)
    would consume at most 5 elements from each iterable. It's not much of
    a stretch. It doesn't happen to be what's proposed, but it's a
    reasonable interpretation. (Though then the default would probably be
    truncate=None to not truncate.)


This was exactly my thought, that Chris wrote very well.  I can easily imagine a 'truncate=5' behavior.  In fact, if it existed, it is something I would have used multiple times.  As is, I use islice() or a break inside a loop, but that hypothetical parameter might be a helpful convenience.

However, it is indeed NOT the current proposal or discussion.

Besides, "zip(iter1, iter2, range(5))" is the same length once you include the extra unpack, plus it works well with earlier versions.

Cheers,
Steve


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

Reply via email to