From: Raymond Hettinger Date: Fri, 9 Oct 2015 01:14:15 +0000 (-0400) Subject: Issue #25326: Improve an obscure error message. X-Git-Tag: v2.7.11rc1~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c90e255e02b493de6c792fc1fb92a44e202ebd3;p=thirdparty%2FPython%2Fcpython.git Issue #25326: Improve an obscure error message. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index 6e289eff6eda..ad7889e15efb 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -259,7 +259,7 @@ PyObject_AsCharBuffer(PyObject *obj, pb->bf_getcharbuffer == NULL || pb->bf_getsegcount == NULL) { PyErr_SetString(PyExc_TypeError, - "expected a character buffer object"); + "expected a string or other character buffer object"); return -1; } if ((*pb->bf_getsegcount)(obj,NULL) != 1) {