diff options
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r-- | Objects/bytearrayobject.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index a96d6d9..5824832 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -1027,14 +1027,6 @@ bytearray_repr(PyByteArrayObject *self) static PyObject * bytearray_str(PyObject *op) { -#if 0 - if (Py_BytesWarningFlag) { - if (PyErr_WarnEx(PyExc_BytesWarning, - "str() on a bytearray instance", 1)) - return NULL; - } - return bytearray_repr((PyByteArrayObject*)op); -#endif return PyBytes_FromStringAndSize(((PyByteArrayObject*)op)->ob_bytes, Py_SIZE(op)); } @@ -1059,7 +1051,7 @@ bytearray_richcompare(PyObject *self, PyObject *other, int op) if (rc) { if (Py_BytesWarningFlag && op == Py_EQ) { if (PyErr_WarnEx(PyExc_BytesWarning, - "Comparison between bytearray and string", 1)) + "Comparison between bytearray and unicode", 1)) return NULL; } |