diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-19 17:47:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-19 17:47:02 (GMT) |
commit | 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae (patch) | |
tree | c329a3e6c42184db981af527867990e19996a0f0 /Objects | |
parent | 004e03fb0c2febe2ec8afbd28ffcb3e980c63228 (diff) | |
download | cpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.zip cpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.tar.gz cpython-6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae.tar.bz2 |
bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytearrayobject.c | 2 | ||||
-rw-r--r-- | Objects/bytesobject.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 3a80b73..fe322d2 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -254,7 +254,7 @@ PyByteArray_Concat(PyObject *a, PyObject *b) if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 || PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) { PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s", - Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name); + Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name); goto done; } diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 1050a93..bde7948 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -1438,7 +1438,7 @@ bytes_concat(PyObject *a, PyObject *b) if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 || PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) { PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s", - Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name); + Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name); goto done; } |