On Tue, Jun 2, 2020, 9:41 AM Steve Dower > > As is, I use islice() or a break inside a loop, but that hypothetical > parameter might be a helpful > > convenience. > > Besides, "zip(iter1, iter2, range(5))" is the same length once you include > the extra unpack, plus it works well with earlier versions.
Oh yeah. I've done that too. For whatever reason, I think I used to use the extra range, and nowadays I'm more likely to use islice(). I have absolutely no argument why one style or the other is better, just my habit has changed. In any case, I'm not advocating for truncate=5 behavior. Merely agreeing that the word truncate is not less ambiguous than the word strict. That's not even saying I prefer strict to truncate; itertools.zip_strict() remains my preference. But I could learn either parameter choice easily enough.
_______________________________________________ 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/3XIS5HCXMEZZUGWBPNT2EDZMQFLN3YQN/ Code of Conduct: http://python.org/psf/codeofconduct/