]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve text of some error messages, as suggested by Sean Reifschneider.
authorGuido van Rossum <guido@python.org>
Mon, 19 Apr 1999 17:44:39 +0000 (17:44 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 19 Apr 1999 17:44:39 +0000 (17:44 +0000)
Objects/listobject.c

index 51d3d07fe355142f59ec20f89994adfcb642d809..05da5dcc0fe6895a273397781ce2f2a5c1d0735b 100644 (file)
@@ -707,7 +707,7 @@ docompare(x, y, compare)
        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 @@ listcount(self, args)
        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++) {