mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
gh-96844: Improve error message of list.remove (gh-106455)
This commit is contained in:
parent
c16ea94abc
commit
217f47d6e5
4 changed files with 6 additions and 5 deletions
|
|
@ -2694,7 +2694,7 @@ list_remove(PyListObject *self, PyObject *value)
|
|||
else if (cmp < 0)
|
||||
return NULL;
|
||||
}
|
||||
PyErr_SetString(PyExc_ValueError, "list.remove(x): x not in list");
|
||||
PyErr_Format(PyExc_ValueError, "%R is not in list", value);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue