diff options
author | Georg Brandl <georg@python.org> | 2007-03-21 09:00:39 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-21 09:00:39 (GMT) |
commit | 5cb76c19ba5b22b926f69d017a79eb2de296785a (patch) | |
tree | 9639fde5cf123ca2c93ff4fafe74d5a6d3535573 /Python | |
parent | aa754b70b051ed683c6e548e2f376b55a75af9b9 (diff) | |
download | cpython-5cb76c19ba5b22b926f69d017a79eb2de296785a.zip cpython-5cb76c19ba5b22b926f69d017a79eb2de296785a.tar.gz cpython-5cb76c19ba5b22b926f69d017a79eb2de296785a.tar.bz2 |
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
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 63efd4e..b35942d 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |