mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
unicode -> str
This commit is contained in:
parent
6e61d18891
commit
aff472394c
1 changed files with 3 additions and 3 deletions
|
|
@ -320,7 +320,7 @@ multibytecodec_encerror(MultibyteCodec *codec,
|
||||||
!PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
|
!PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"encoding error handler must return "
|
"encoding error handler must return "
|
||||||
"(unicode, int) tuple");
|
"(str, int) tuple");
|
||||||
goto errorexit;
|
goto errorexit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -439,7 +439,7 @@ multibytecodec_decerror(MultibyteCodec *codec,
|
||||||
!PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
|
!PyLong_Check(PyTuple_GET_ITEM(retobj, 1))) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"decoding error handler must return "
|
"decoding error handler must return "
|
||||||
"(unicode, int) tuple");
|
"(str, int) tuple");
|
||||||
goto errorexit;
|
goto errorexit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -760,7 +760,7 @@ encoder_encode_stateful(MultibyteStatefulEncoderContext *ctx,
|
||||||
return NULL;
|
return NULL;
|
||||||
else if (!PyUnicode_Check(unistr)) {
|
else if (!PyUnicode_Check(unistr)) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"couldn't convert the object to unicode.");
|
"couldn't convert the object to str.");
|
||||||
Py_DECREF(ucvt);
|
Py_DECREF(ucvt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue