Skip to content

Commit a273bc9

Browse files
gh-122431: Correct the non-negative error message in readline.append_history_file (GH-143075)
"positive" -> "non-negative", since zero is included.
1 parent 5b5ee3c commit a273bc9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Corrected the error message in :func:`readline.append_history_file` to state that ``nelements`` must be non-negative instead of positive.

Modules/readline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ readline_append_history_file_impl(PyObject *module, int nelements,
391391
{
392392
if (nelements < 0)
393393
{
394-
PyErr_SetString(PyExc_ValueError, "nelements must be positive");
394+
PyErr_SetString(PyExc_ValueError, "nelements must be non-negative");
395395
return NULL;
396396
}
397397

0 commit comments

Comments
 (0)