summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-24 19:57:45 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-24 19:57:45 (GMT)
commit661ea26b3d8621ad0acc0ed2f2036ab29355f8ff (patch)
treefcfe10c4656a3e18911cd3b41b7d8c942d707786 /Objects/fileobject.c
parentbd6f4fba1bc66a18cc15d50ffdd33faedff5ac4c (diff)
downloadcpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.zip
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.gz
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.bz2
Ka-Ping Yee <ping@lfw.org>:
Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index b8b47f8..94c5bb0 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -833,7 +833,7 @@ file_readlines(PyFileObject *f, PyObject *args)
buffersize *= 2;
if (buffersize > INT_MAX) {
PyErr_SetString(PyExc_OverflowError,
- "line is too long for a Python string");
+ "line is longer than a Python string can hold");
goto error;
}
if (big_buffer == NULL) {
@@ -938,7 +938,7 @@ file_writelines(PyFileObject *f, PyObject *args)
return err_closed();
if (args == NULL || !PySequence_Check(args)) {
PyErr_SetString(PyExc_TypeError,
- "writelines() requires sequence of strings");
+ "writelines() argument must be a sequence of strings");
return NULL;
}
islist = PyList_Check(args);
@@ -1001,7 +1001,7 @@ file_writelines(PyFileObject *f, PyObject *args)
&buffer,
&len))) {
PyErr_SetString(PyExc_TypeError,
- "writelines() requires sequences of strings");
+ "writelines() argument must be a sequence of strings");
goto error;
}
line = PyString_FromStringAndSize(buffer,