On Wed, Apr 22, 2020 at 1:22 AM Soni L. <fakedme...@gmail.com> wrote: > looking further into it, zip() already guarantees the StopIteration isn't > gonna preserve the original StopIteration, so this should be a non-breaking > change: > > https://docs.python.org/3/library/functions.html#zip >
I'm sorry, I'm not sure I understand you here - do you mean that it *doesn't* guarantee that it *will* preserve it, or is there actually a guarantee that it will *not* preserve it? > Equivalent to: Bear in mind that the equivalencies aren't always exact. > result = [] > for it in iterators: > elem = next(it, sentinel) > if elem is sentinel: > return > result.append(elem) > > my proposal is to change that "return" into "return tuple(result)". > That'd make it show up as the exception's 'value', not in its args. If indeed there's no guarantee, then I would fully support this change - should be a non-breaking change and could be convenient. ChrisA _______________________________________________ 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/TOANWZ4LTXXBVX5R6IUAGLCFX3QRNVAP/ Code of Conduct: http://python.org/psf/codeofconduct/