summaryrefslogtreecommitdiffstats
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2019-08-30 04:25:48 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-08-30 04:25:48 (GMT)
commit6a650aaf7735e30636db2721247f317064c2cfd4 (patch)
treecab175d9090dacfb5183ac30abf3339e6e3e7489 /Modules/itertoolsmodule.c
parent496058f59937da478eb172c864502b5dcf67705b (diff)
downloadcpython-6a650aaf7735e30636db2721247f317064c2cfd4.zip
cpython-6a650aaf7735e30636db2721247f317064c2cfd4.tar.gz
cpython-6a650aaf7735e30636db2721247f317064c2cfd4.tar.bz2
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592)
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 101addc..ab473e2 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -4442,10 +4442,6 @@ zip_longest_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *item = PyTuple_GET_ITEM(args, i);
PyObject *it = PyObject_GetIter(item);
if (it == NULL) {
- if (PyErr_ExceptionMatches(PyExc_TypeError))
- PyErr_Format(PyExc_TypeError,
- "zip_longest argument #%zd must support iteration",
- i+1);
Py_DECREF(ittuple);
return NULL;
}