summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew McNamara <andrewm@object-craft.com.au>2005-01-12 11:39:50 (GMT)
committerAndrew McNamara <andrewm@object-craft.com.au>2005-01-12 11:39:50 (GMT)
commit5cfd83748a5e535a7bb88a9a003e48dbfbff7e1f (patch)
tree4ac5d3997b3d19785417aa2a6a29ed697fbed21a
parent7f2053eff3ec1ee9084a3a550ae363a804368322 (diff)
downloadcpython-5cfd83748a5e535a7bb88a9a003e48dbfbff7e1f.zip
cpython-5cfd83748a5e535a7bb88a9a003e48dbfbff7e1f.tar.gz
cpython-5cfd83748a5e535a7bb88a9a003e48dbfbff7e1f.tar.bz2
Improve wording of parser error message.
-rw-r--r--Modules/_csv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c
index ce4c738..8547d3c 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -717,7 +717,7 @@ parse_process_char(ReaderObj *self, char c)
else {
/* illegal */
self->had_parse_error = 1;
- PyErr_Format(error_obj, "%c expected after %c",
+ PyErr_Format(error_obj, "'%c' expected after '%c'",
dialect->delimiter,
dialect->quotechar);
return -1;
@@ -1354,7 +1354,7 @@ csv_writer(PyObject *module, PyObject *args, PyObject *keyword_args)
self->writeline = PyObject_GetAttrString(output_file, "write");
if (self->writeline == NULL || !PyCallable_Check(self->writeline)) {
PyErr_SetString(PyExc_TypeError,
- "argument 1 must be an instance with a write method");
+ "argument 1 must have a \"write\" method");
Py_DECREF(self);
return NULL;
}