diff -r ab4432daf69f Modules/_struct.c --- a/Modules/_struct.c Mon Oct 22 21:50:27 2012 -0700 +++ b/Modules/_struct.c Tue Oct 23 13:52:33 2012 +0300 @@ -1661,7 +1661,7 @@ if (PyTuple_GET_SIZE(args) != soself->s_len) { PyErr_Format(StructError, - "pack requires exactly %zd arguments", soself->s_len); + "pack expected %zd items for packing (got %zd)", soself->s_len, PyTuple_GET_SIZE(args)); return NULL; } @@ -1701,8 +1701,8 @@ if (PyTuple_GET_SIZE(args) != (soself->s_len + 2)) { PyErr_Format(StructError, - "pack_into requires exactly %zd arguments", - (soself->s_len + 2)); + "pack_into expected %zd items for packing (got %zd)", + (soself->s_len + 2), PyTuple_GET_SIZE(args)); return NULL; }