diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:17:59 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:17:59 (GMT) |
commit | 4c1fe51ca0d0972e30a3825011a7ec243827167d (patch) | |
tree | a0540947edd900f12f6fd6fc50e78bfb69945c53 | |
parent | a7dc949e170237d6e59a0c0c5c784a00960756a7 (diff) | |
download | cpython-4c1fe51ca0d0972e30a3825011a7ec243827167d.zip cpython-4c1fe51ca0d0972e30a3825011a7ec243827167d.tar.gz cpython-4c1fe51ca0d0972e30a3825011a7ec243827167d.tar.bz2 |
don't ignore exceptions from _PyObject_LengthHint
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 8f6e855..f8a6d93 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2383,8 +2383,10 @@ builtin_zip(PyObject *self, PyObject *args) len = -1; /* unknown */ for (i = 0; i < itemsize; ++i) { PyObject *item = PyTuple_GET_ITEM(args, i); - Py_ssize_t thislen = _PyObject_LengthHint(item, -1); + Py_ssize_t thislen = _PyObject_LengthHint(item, -2); if (thislen < 0) { + if (thislen == -1) + return NULL; len = -1; break; } |