mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
SF bug [#466173] unpack TypeError unclear
Replaced 3 instances of "iter() of non-sequence" with "iteration over non-sequence". Restored "unpack non-sequence" for stuff like "a, b = 1".
This commit is contained in:
parent
d38b1c74f3
commit
8b13b3ede2
4 changed files with 8 additions and 4 deletions
|
@ -1556,8 +1556,12 @@ eval_frame(PyFrameObject *f)
|
|||
else if (unpack_iterable(v, oparg,
|
||||
stack_pointer + oparg))
|
||||
stack_pointer += oparg;
|
||||
else
|
||||
else {
|
||||
if (PyErr_ExceptionMatches(PyExc_TypeError))
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"unpack non-sequence");
|
||||
why = WHY_EXCEPTION;
|
||||
}
|
||||
Py_DECREF(v);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue