gh-122431: Correct the non-negative error message in readline.append_history_file (GH-143075)

"positive" -> "non-negative", since zero is included.
This commit is contained in:
Zheng Yu 2025-12-22 22:35:23 -06:00 committed by GitHub
parent 5b5ee3c4bf
commit a273bc99d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -0,0 +1 @@
Corrected the error message in :func:`readline.append_history_file` to state that ``nelements`` must be non-negative instead of positive.

View file

@ -391,7 +391,7 @@ readline_append_history_file_impl(PyObject *module, int nelements,
{
if (nelements < 0)
{
PyErr_SetString(PyExc_ValueError, "nelements must be positive");
PyErr_SetString(PyExc_ValueError, "nelements must be non-negative");
return NULL;
}