diff options
author | Georg Brandl <georg@python.org> | 2007-03-21 09:00:55 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-21 09:00:55 (GMT) |
commit | 8a10ea4613e0bbcd067609d8d205b6ca71420f08 (patch) | |
tree | ce699f66f28ffb893f154c34d5908b1077e04990 /Python | |
parent | f94e89c57801ffdc17c7246704c7e1c41bbc4791 (diff) | |
download | cpython-8a10ea4613e0bbcd067609d8d205b6ca71420f08.zip cpython-8a10ea4613e0bbcd067609d8d205b6ca71420f08.tar.gz cpython-8a10ea4613e0bbcd067609d8d205b6ca71420f08.tar.bz2 |
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)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 690b2be..9dddd2f 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |