diff -r f647a2c5f290 Modules/binascii.c --- a/Modules/binascii.c Sat Nov 02 10:54:58 2013 +0200 +++ b/Modules/binascii.c Sat Nov 02 21:41:22 2013 +0800 @@ -207,13 +207,13 @@ if (PyObject_GetBuffer(arg, buf, PyBUF_SIMPLE) != 0) { PyErr_Format(PyExc_TypeError, "argument should be bytes, buffer or ASCII string, " - "not %R", Py_TYPE(arg)); + "not %.200s", Py_TYPE(arg)->tp_name); return 0; } if (!PyBuffer_IsContiguous(buf, 'C')) { PyErr_Format(PyExc_TypeError, "argument should be a contiguous buffer, " - "not %R", Py_TYPE(arg)); + "not %.200s", Py_TYPE(arg)->tp_name); PyBuffer_Release(buf); return 0; }