Message350807
> 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:17 | rhettinger | set | recipients:
+ rhettinger, serhiy.storchaka, sir-sigurd |
2019-08-29 17:04:17 | rhettinger | set | messageid: <1567098257.3.0.957057063911.issue37976@roundup.psfhosted.org> |
2019-08-29 17:04:17 | rhettinger | link | issue37976 messages |
2019-08-29 17:04:17 | rhettinger | create | |
|