Skip to content

Commit c595eae

Browse files
authored
gh-127238: adjust error message for sys.set_int_max_str_digits() (#127241)
Now it's correct and closer to Python/initconfig.c
1 parent 17c16ae commit c595eae

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct error message for :func:`sys.set_int_max_str_digits`.

Python/sysmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4104,7 +4104,7 @@ _PySys_SetIntMaxStrDigits(int maxdigits)
41044104
{
41054105
if (maxdigits != 0 && maxdigits < _PY_LONG_MAX_STR_DIGITS_THRESHOLD) {
41064106
PyErr_Format(
4107-
PyExc_ValueError, "maxdigits must be 0 or larger than %d",
4107+
PyExc_ValueError, "maxdigits must be >= %d or 0 for unlimited",
41084108
_PY_LONG_MAX_STR_DIGITS_THRESHOLD);
41094109
return -1;
41104110
}

0 commit comments

Comments
 (0)