Slightly improve buffer-related error message.

This commit is contained in:
Georg Brandl 2009-08-04 20:29:27 +00:00
parent 3eb562ba48
commit 61b96dc2fe
2 changed files with 2 additions and 2 deletions

View File

@ -331,7 +331,7 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags)
{
if (!PyObject_CheckBuffer(obj)) {
PyErr_Format(PyExc_TypeError,
"'%100s' does not have the buffer interface",
"'%100s' does not support the buffer interface",
Py_TYPE(obj)->tp_name);
return -1;
}

View File

@ -255,7 +255,7 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char fort)
if (!PyObject_CheckBuffer(obj)) {
PyErr_SetString(PyExc_TypeError,
"object does not have the buffer interface");
"object does not support the buffer interface");
return NULL;
}