There was an error while loading. Please reload this page.
readline.append_history_file
1 parent 5b5ee3c commit a273bc9Copy full SHA for a273bc9
2 files changed
Misc/NEWS.d/next/Library/2025-12-22-22-36-21.gh-issue-122431.9E3085.rst
@@ -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
@@ -391,7 +391,7 @@ readline_append_history_file_impl(PyObject *module, int nelements,
391
{
392
if (nelements < 0)
393
394
- PyErr_SetString(PyExc_ValueError, "nelements must be positive");
+ PyErr_SetString(PyExc_ValueError, "nelements must be non-negative");
395
return NULL;
396
}
397
0 commit comments