Skip to content

Commit

Permalink
gh-127238: adjust error message for sys.set_int_max_str_digits()
Browse files Browse the repository at this point in the history
Now it's correct and closer to Python/initconfig.c
  • Loading branch information
skirpichev committed Nov 25, 2024
1 parent f7bb658 commit aec80e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correct error message for :func:`sys.set_int_max_str_digits`.
2 changes: 1 addition & 1 deletion Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -4104,7 +4104,7 @@ _PySys_SetIntMaxStrDigits(int maxdigits)
{
if (maxdigits != 0 && maxdigits < _PY_LONG_MAX_STR_DIGITS_THRESHOLD) {
PyErr_Format(
PyExc_ValueError, "maxdigits must be 0 or larger than %d",
PyExc_ValueError, "maxdigits must be >= %d or 0 for unlimited",
_PY_LONG_MAX_STR_DIGITS_THRESHOLD);
return -1;
}
Expand Down

0 comments on commit aec80e7

Please sign in to comment.