diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 2a9049049935e6..a79064f9336a16 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -568,7 +568,7 @@ tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start, else if (cmp < 0) return NULL; } - PyErr_SetString(PyExc_ValueError, "tuple.index(x): x not in tuple"); + PyErr_Format(PyExc_ValueError, "%R is not in tuple", value); return NULL; }