diff options
| author | Georg Brandl <georg@python.org> | 2010-07-10 10:32:36 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-07-10 10:32:36 +0000 |
| commit | 4604302f01b95df559dc826a157fe3b2f33bf7cf (patch) | |
| tree | 754e108f112be42a90d363e2c775803cd7fa01bb /Python/ceval.c | |
| parent | 04f323979fc6cf2f5e5e8f02c82be56cce2c7511 (diff) | |
| download | cpython-4604302f01b95df559dc826a157fe3b2f33bf7cf.tar.gz | |
#3071: tell how many values were expected when unpacking too many.
Diffstat (limited to 'Python/ceval.c')
| -rw-r--r-- | Python/ceval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 6e4911ae92..2d4b16a39a 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; } |
