Patch #1682205: a TypeError while unpacking an iterable is no longer

masked by a generic one with the message "unpack non-sequence".
 (backport from rev. 54480)
This commit is contained in:
Georg Brandl 2007-03-21 09:00:55 +00:00
parent f94e89c578
commit 8a10ea4613
3 changed files with 7 additions and 6 deletions

View file

@ -1765,12 +1765,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PUSH(w);
}
} else if (unpack_iterable(v, oparg,
stack_pointer + oparg))
stack_pointer + oparg)) {
stack_pointer += oparg;
else {
if (PyErr_ExceptionMatches(PyExc_TypeError))
PyErr_SetString(PyExc_TypeError,
"unpack non-sequence");
} else {
/* unpack_iterable() raised an exception */
why = WHY_EXCEPTION;
}
Py_DECREF(v);