mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Remove confusing error message in bytes.translate.
This commit is contained in:
parent
2a013eac6c
commit
09923f3b45
1 changed files with 0 additions and 5 deletions
|
|
@ -1892,11 +1892,6 @@ string_translate(PyBytesObject *self, PyObject *args)
|
||||||
del_table = PyBytes_AS_STRING(delobj);
|
del_table = PyBytes_AS_STRING(delobj);
|
||||||
dellen = PyBytes_GET_SIZE(delobj);
|
dellen = PyBytes_GET_SIZE(delobj);
|
||||||
}
|
}
|
||||||
else if (PyUnicode_Check(delobj)) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,
|
|
||||||
"deletions are implemented differently for unicode");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
else if (PyObject_AsCharBuffer(delobj, &del_table, &dellen))
|
else if (PyObject_AsCharBuffer(delobj, &del_table, &dellen))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue