masked by a generic one with the message "unpack non-sequence".
(backport from rev. 54480)
>>> a, b, c = 7
Traceback (most recent call last):
...
- TypeError: unpack non-sequence
+ TypeError: 'int' object is not iterable
Unpacking tuple of wrong size
Core and builtins
-----------------
+- Patch #1682205: a TypeError while unpacking an iterable is no longer
+ masked by a generic one with the message "unpack non-sequence".
+
- Patch #1642547: Fix an error/crash when encountering syntax errors in
complex if statements.
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);