Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 41256:9cf22c5eee3d legacy-trunk
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Wed, 21 Mar 2007 09:00:39 +0000 |
| parents | 6d3454c371dd |
| children | 0d1e415ec36c |
line wrap: on
line diff
--- a/Python/ceval.c Wed Mar 21 06:39:48 2007 +0000 +++ b/Python/ceval.c Wed Mar 21 09:00:39 2007 +0000 @@ -1774,12 +1774,10 @@ 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);
