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.
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 6fd4db3..753097b 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -746,7 +746,7 @@
     }
     else {
         PyErr_Format(PyExc_TypeError,
-                     "tuple indices must be integers, not %.200s",
+                     "tuple indices must be integers or slices, not %.200s",
                      Py_TYPE(item)->tp_name);
         return NULL;
     }