diff options
author | Guido van Rossum <guido@python.org> | 1999-04-19 17:44:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-04-19 17:44:39 (GMT) |
commit | 9bcd1d7931f32fdc4a677aacd0c0f4932b22118b (patch) | |
tree | 326650ca2f5580fe167fba39586bfd199ab76d70 /Objects/listobject.c | |
parent | 0cf46bc0f4ebbe2a4fe9cd7d32e02b239ee4a058 (diff) | |
download | cpython-9bcd1d7931f32fdc4a677aacd0c0f4932b22118b.zip cpython-9bcd1d7931f32fdc4a677aacd0c0f4932b22118b.tar.gz cpython-9bcd1d7931f32fdc4a677aacd0c0f4932b22118b.tar.bz2 |
Improve text of some error messages, as suggested by Sean Reifschneider.
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r-- | Objects/listobject.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 51d3d07..05da5dc 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -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++) { |