On 4/21/2020 10:10 AM, Soni L. wrote:
I feel like zip could return partial results:
try:
next(zip([0], []))
except StopIteration as exc:
assert StopIteration.args == (0,)
how much would this break?
It would break a lot of code, and so it won't happen.
You can use itertools.zip_longest with your own sentinel to get the same
behavior.
In your proposal, what would next(zip([0], [], [0])) result in?
_______________________________________________
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/NQWRZFM72CPSCQXWFFFTYERTGQY5HHA3/
Code of Conduct: http://python.org/psf/codeofconduct/