diff options
author | Georg Brandl <georg@python.org> | 2008-12-27 23:12:09 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-12-27 23:12:09 (GMT) |
commit | 09923f3b453028ac6eecbdf3f429663662f51792 (patch) | |
tree | 9a41f4e7f7d28f766c17c1ca5ed9a4c6c17313ff /Objects | |
parent | 2a013eac6c558e5065ebdcd3054a5688997de277 (diff) | |
download | cpython-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.c | 5 |
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; } |