summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-27 23:12:09 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-27 23:12:09 (GMT)
commit09923f3b453028ac6eecbdf3f429663662f51792 (patch)
tree9a41f4e7f7d28f766c17c1ca5ed9a4c6c17313ff /Objects
parent2a013eac6c558e5065ebdcd3054a5688997de277 (diff)
downloadcpython-09923f3b453028ac6eecbdf3f429663662f51792.zip
cpython-09923f3b453028ac6eecbdf3f429663662f51792.tar.gz
cpython-09923f3b453028ac6eecbdf3f429663662f51792.tar.bz2
Remove confusing error message in bytes.translate.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytesobject.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index ca8b857..b28a554 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -1892,11 +1892,6 @@ string_translate(PyBytesObject *self, PyObject *args)
del_table = PyBytes_AS_STRING(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))
return NULL;
}