Skip to content

Commit 9c17e38

Browse files
committed
change wording to argument must be at least 0
1 parent 0e2d398 commit 9c17e38

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Lib/test/clinic.test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,7 +1701,7 @@ test_Py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t na
17011701
d = ival;
17021702
if (d < 0) {
17031703
PyErr_SetString(PyExc_ValueError,
1704-
"d must be >=0");
1704+
"d must be at least 0");
17051705
goto exit;
17061706
}
17071707
}
@@ -1743,7 +1743,7 @@ static PyObject *
17431743
test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
17441744
Py_ssize_t c, Py_ssize_t d, Py_ssize_t e,
17451745
Py_ssize_t f, Py_ssize_t g)
1746-
/*[clinic end generated code: output=2034b285dd317556 input=a25bac8ecf2890aa]*/
1746+
/*[clinic end generated code: output=41297dd17ad0458d input=a25bac8ecf2890aa]*/
17471747

17481748

17491749
/*[clinic input]

Modules/clinic/_testclinic.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/modsupport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _Py_convert_optional_to_non_negative_ssize_t(PyObject *obj, void *result)
4040
return 0;
4141
}
4242
if (obj != Py_None && *((Py_ssize_t *)result) < 0) {
43-
PyErr_SetString(PyExc_ValueError, "argument must be >= 0");
43+
PyErr_SetString(PyExc_ValueError, "argument must be at least 0");
4444
return 0;
4545
}
4646
return 1;

Tools/clinic/libclinic/converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def parse_arg(self, argname: str, displayname: str, *, limited_capi: bool) -> st
447447
non_negative_check = self.format_code("""
448448
if ({paramname} < 0) {{{{
449449
PyErr_SetString(PyExc_ValueError,
450-
"{paramname} must be >=0");
450+
"{paramname} must be at least 0");
451451
goto exit;
452452
}}}}""",
453453
argname=argname)

0 commit comments

Comments
 (0)