Author rhettinger
Recipients rhettinger, serhiy.storchaka, sir-sigurd
Date 2019-08-29.17:04:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I am not even sure this is a bug.

It really isn't :-)

But it is okay to want to improve the traceback.

Using _PyErr_FormatFromCause() is plausible, but the resulting traceback is messy.  Since there isn't much value in reporting which iterable number has failed, I prefer to just simplify the code with:

-            if (PyErr_ExceptionMatches(PyExc_TypeError))
-                PyErr_Format(PyExc_TypeError,
-                    "zip argument #%zd must support iteration",
-                    i+1);

The same change can also be applied to itertools.zip_longest().
Date User Action Args
2019-08-29 17:04:17rhettingersetrecipients: + rhettinger, serhiy.storchaka, sir-sigurd
2019-08-29 17:04:17rhettingersetmessageid: <>
2019-08-29 17:04:17rhettingerlinkissue37976 messages
2019-08-29 17:04:17rhettingercreate