diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-08-02 05:30:37 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-08-02 05:30:37 (GMT) |
commit | ffff1440d118cae189a6c2baf595dda52cdc7c3a (patch) | |
tree | e1664353a0276044933c16879fa59e7521a6044e /Objects/bytesobject.c | |
parent | 7f9cc9359bdbcc877b2a6f976c8e8bdbc714ce90 (diff) | |
download | cpython-ffff1440d118cae189a6c2baf595dda52cdc7c3a.zip cpython-ffff1440d118cae189a6c2baf595dda52cdc7c3a.tar.gz cpython-ffff1440d118cae189a6c2baf595dda52cdc7c3a.tar.bz2 |
Issue #22077: Improve index error messages for bytearrays, bytes, lists, and
tuples by adding 'or slices'. Added ', not <typename' for bytearrays.
Original patch by Claudiu Popa.
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index aff09cd..ca565eb 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -999,7 +999,7 @@ bytes_subscript(PyBytesObject* self, PyObject* item) } else { PyErr_Format(PyExc_TypeError, - "byte indices must be integers, not %.200s", + "byte indices must be integers or slices, not %.200s", Py_TYPE(item)->tp_name); return NULL; } |