From 09923f3b453028ac6eecbdf3f429663662f51792 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 27 Dec 2008 23:12:09 +0000 Subject: Remove confusing error message in bytes.translate. --- Objects/bytesobject.c | 5 ----- 1 file changed, 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; } -- cgit v0.12