Revert "gh-96844: Improve error message of list.remove (gh-106455)" (#116956)

This reverts commit 217f47d6e5.
This commit is contained in:
Victor Stinner 2024-03-18 14:54:45 +01:00 committed by GitHub
parent 2a4cbf17af
commit f6cdc6b4a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -3194,7 +3194,7 @@ list_remove_impl(PyListObject *self, PyObject *value)
else if (cmp < 0)
return NULL;
}
PyErr_Format(PyExc_ValueError, "%R is not in list", value);
PyErr_SetString(PyExc_ValueError, "list.remove(x): x not in list");
return NULL;
}