mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Issue #22581: Use more "bytes-like object" throughout the docs and comments.
This commit is contained in:
parent
6b335196c5
commit
b757c83ec6
12 changed files with 39 additions and 37 deletions
|
@ -2940,8 +2940,7 @@ PyUnicode_FromEncodedObject(PyObject *obj,
|
|||
/* Retrieve a bytes buffer view through the PEP 3118 buffer interface */
|
||||
if (PyObject_GetBuffer(obj, &buffer, PyBUF_SIMPLE) < 0) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"coercing to str: need bytes, bytearray "
|
||||
"or buffer-like object, %.80s found",
|
||||
"coercing to str: need a bytes-like object, %.80s found",
|
||||
Py_TYPE(obj)->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue