Michael Hudson <mwh21@cam.ac.uk>:
Removed PyErr_BadArgument() calls and replaced them with more useful
error messages.
diff --git a/Modules/structmodule.c b/Modules/structmodule.c
index 0a706a9..d872e31 100644
--- a/Modules/structmodule.c
+++ b/Modules/structmodule.c
@@ -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);