Kaydet (Commit) f2a94216 authored tarafından Victor Stinner's avatar Victor Stinner

Close #10616: mention bytes and bytearray in PyObject_AsCharBuffer() error

message
üst 2a12974b
......@@ -237,7 +237,8 @@ PyObject_AsCharBuffer(PyObject *obj,
pb = obj->ob_type->tp_as_buffer;
if (pb == NULL || pb->bf_getbuffer == NULL) {
PyErr_SetString(PyExc_TypeError,
"expected an object with the buffer interface");
"expected bytes, bytearray "
"or buffer compatible object");
return -1;
}
if ((*pb->bf_getbuffer)(obj, &view, PyBUF_SIMPLE)) return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment