Skip to content

Commit 409a5ea

Browse files
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 4d62380 commit 409a5ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/test/test_readline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_write_read_append(self):
117117
with self.assertRaises(ValueError):
118118
readline.append_history_file(-42, hfilename)
119119

120-
# See gh-122431, using the minumum signed integer value caused a segfault
120+
# See gh-122431, using the minimum signed integer value caused a segfault
121121
with self.assertRaises(ValueError):
122122
readline.append_history_file(-2147483648, hfilename)
123123

Modules/readline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ readline_append_history_file_impl(PyObject *module, int nelements,
353353
{
354354
if (nelements < 0)
355355
{
356-
PyErr_SetString(PyExc_ValueError, "nelements cannot be negative");
356+
PyErr_SetString(PyExc_ValueError, "nelements must be positive");
357357
return NULL;
358358
}
359359

0 commit comments

Comments
 (0)