summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-30 05:58:42 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-30 05:58:42 (GMT)
commit8b13b3ede270bf6f7bf3427675e335ab0bd0f75b (patch)
tree91dd83bf24d7234cc68b50914cc883960e7df92f /Python/ceval.c
parentd38b1c74f3f28a3f9a73c142d9be83425adaa6e1 (diff)
downloadcpython-8b13b3ede270bf6f7bf3427675e335ab0bd0f75b.zip
cpython-8b13b3ede270bf6f7bf3427675e335ab0bd0f75b.tar.gz
cpython-8b13b3ede270bf6f7bf3427675e335ab0bd0f75b.tar.bz2
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".
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 731e93f..132fb72 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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;