commit | 4c1fe51ca0d0972e30a3825011a7ec243827167d | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Sat May 09 19:17:59 2009 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Sat May 09 19:17:59 2009 +0000 |
tree | a0540947edd900f12f6fd6fc50e78bfb69945c53 | |
parent | a7dc949e170237d6e59a0c0c5c784a00960756a7 [diff] [blame] |
don't ignore exceptions from _PyObject_LengthHint
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 @@ 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; }