Mercurial > cpython-lru_cache-weakref
diff Modules/structmodule.c @ 12814:b1b260a2de98 legacy-trunk
Michael Hudson <mwh21@cam.ac.uk>:
Removed PyErr_BadArgument() calls and replaced them with more useful
error messages.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 01 Jun 2000 02:02:46 +0000 |
| parents | dc65c5f6ad7c |
| children | 916fb024ce94 |
line wrap: on
line diff
--- a/Modules/structmodule.c Thu Jun 01 01:17:17 2000 +0000 +++ b/Modules/structmodule.c Thu Jun 01 02:02:46 2000 +0000 @@ -1128,7 +1128,8 @@ if (args == NULL || !PyTuple_Check(args) || (n = PyTuple_Size(args)) < 1) { - PyErr_BadArgument(); + PyErr_SetString(PyExc_TypeError, + "struct.pack requires at least one argument"); return NULL; } format = PyTuple_GetItem(args, 0);
