mirror of https://github.com/python/cpython.git
gh-127238: adjust error message for sys.set_int_max_str_digits() (#127241)
Now it's correct and closer to Python/initconfig.c
This commit is contained in:
parent
17c16aea66
commit
c595eae84c
|
@ -0,0 +1 @@
|
||||||
|
Correct error message for :func:`sys.set_int_max_str_digits`.
|
|
@ -4104,7 +4104,7 @@ _PySys_SetIntMaxStrDigits(int maxdigits)
|
||||||
{
|
{
|
||||||
if (maxdigits != 0 && maxdigits < _PY_LONG_MAX_STR_DIGITS_THRESHOLD) {
|
if (maxdigits != 0 && maxdigits < _PY_LONG_MAX_STR_DIGITS_THRESHOLD) {
|
||||||
PyErr_Format(
|
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);
|
_PY_LONG_MAX_STR_DIGITS_THRESHOLD);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue