aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python/src/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.com>2024-06-13 19:29:50 +0300
committershadchin <shadchin@yandex-team.com>2024-06-13 19:51:47 +0300
commit9051e2318afc1bfbd88a103f7392e622aa8c9527 (patch)
tree5c63ea23ebd5e7b7b9864903a9312aa853193ca5 /contrib/tools/python/src/Objects/bytearrayobject.c
parent224da250178b9250c7577a167d44f94f732d3627 (diff)
downloadydb-9051e2318afc1bfbd88a103f7392e622aa8c9527.tar.gz
Update Python from 2.7.16 to 2.7.18
2a151e9cf2ebdfa59d250c1bbb800e908703a6f0
Diffstat (limited to 'contrib/tools/python/src/Objects/bytearrayobject.c')
-rw-r--r--contrib/tools/python/src/Objects/bytearrayobject.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/contrib/tools/python/src/Objects/bytearrayobject.c b/contrib/tools/python/src/Objects/bytearrayobject.c
index a96d6d981d..5824832477 100644
--- a/contrib/tools/python/src/Objects/bytearrayobject.c
+++ b/contrib/tools/python/src/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;
}