summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-10 10:32:36 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-10 10:32:36 (GMT)
commit0310a83e7f2cb7cdb94d5a1a737681119783c834 (patch)
treee917b6589145aaa0372002c52a6b23a3bf60be87 /Python
parent93eb42e805524cd1375deab520d6f4828e0a4f53 (diff)
downloadcpython-0310a83e7f2cb7cdb94d5a1a737681119783c834.zip
cpython-0310a83e7f2cb7cdb94d5a1a737681119783c834.tar.gz
cpython-0310a83e7f2cb7cdb94d5a1a737681119783c834.tar.bz2
#3071: tell how many values were expected when unpacking too many.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 6e4911a..2d4b16a 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3464,7 +3464,8 @@ unpack_iterable(PyObject *v, int argcnt, int argcntafter, PyObject **sp)
return 1;
}
Py_DECREF(w);
- PyErr_SetString(PyExc_ValueError, "too many values to unpack");
+ PyErr_Format(PyExc_ValueError, "too many values to unpack "
+ "(expected %d)", argcnt);
goto Error;
}