summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-08-30 06:23:17 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-08-30 06:23:17 (GMT)
commit27f418640cf39c035114f29cc2d628775b43c0f9 (patch)
tree6bf1a6b4b86e034785f240a677da6590c8d4697f /Modules
parentc19d6bca5577547b3f4624d99b5f5f1db3e5e695 (diff)
downloadcpython-27f418640cf39c035114f29cc2d628775b43c0f9.zip
cpython-27f418640cf39c035114f29cc2d628775b43c0f9.tar.gz
cpython-27f418640cf39c035114f29cc2d628775b43c0f9.tar.bz2
bpo-37976: Prevent shadowing of TypeError in zip() (GH-15592) (GH-15608)
(cherry picked from commit 6a650aaf7735e30636db2721247f317064c2cfd4) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/itertoolsmodule.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 00e3cbb..22c04f2 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -4434,10 +4434,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;
}