mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
This commit is contained in:
@@ -1774,12 +1774,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);
|
||||
|
||||
Reference in New Issue
Block a user