>>> a, b = t
Traceback (most recent call last):
...
- ValueError: too many values to unpack
+ ValueError: too many values to unpack (expected 2)
Unpacking tuple of wrong size
>>> a, b = l
Traceback (most recent call last):
...
- ValueError: too many values to unpack
+ ValueError: too many values to unpack (expected 2)
Unpacking sequence too short
>>> a, b = Seq()
Traceback (most recent call last):
...
- ValueError: too many values to unpack
+ ValueError: too many values to unpack (expected 2)
Unpacking a sequence where the test for too long raises a different kind of
error
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;
}