diff Objects/listobject.c @ 10620:891d089aba41 legacy-trunk

Improve text of some error messages, as suggested by Sean Reifschneider.
author Guido van Rossum <guido@python.org>
date Mon, 19 Apr 1999 17:44:39 +0000
parents 14dcbb34b9dd
children bf6a0983951d
line wrap: on
line diff
--- a/Objects/listobject.c	Mon Apr 19 17:22:12 1999 +0000
+++ b/Objects/listobject.c	Mon Apr 19 17:44:39 1999 +0000
@@ -707,7 +707,7 @@
 	if (!PyInt_Check(res)) {
 		Py_DECREF(res);
 		PyErr_SetString(PyExc_TypeError,
-				"comparison function should return int");
+				"comparison function must return int");
 		return CMPERROR;
 	}
 	i = PyInt_AsLong(res);
@@ -1340,7 +1340,8 @@
 	int i;
 	
 	if (args == NULL) {
-		PyErr_BadArgument();
+		PyErr_SetString(PyExc_TypeError,
+				"list.count(x): argument missing");
 		return NULL;
 	}
 	for (i = 0; i < self->ob_size; i++) {