https://github.com/python/cpython/commit/c595eae84c7f665eced09ce67a1ad83b7574d6e5
commit: c595eae84c7f665eced09ce67a1ad83b7574d6e5
branch: main
author: Sergey B Kirpichev <[email protected]>
committer: terryjreedy <[email protected]>
date: 2024-11-25T00:29:55-05:00
summary:

gh-127238: adjust error message for sys.set_int_max_str_digits() (#127241)

Now it's correct and closer to Python/initconfig.c

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2024-11-25-05-15-21.gh-issue-127238.O8wkH-.rst
M Python/sysmodule.c

diff --git 
a/Misc/NEWS.d/next/Core_and_Builtins/2024-11-25-05-15-21.gh-issue-127238.O8wkH-.rst
 
b/Misc/NEWS.d/next/Core_and_Builtins/2024-11-25-05-15-21.gh-issue-127238.O8wkH-.rst
new file mode 100644
index 00000000000000..e8a274fcd31f26
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Core_and_Builtins/2024-11-25-05-15-21.gh-issue-127238.O8wkH-.rst
@@ -0,0 +1 @@
+Correct error message for :func:`sys.set_int_max_str_digits`.
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index aaef5aa532412b..6df297f364c5d3 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -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;
     }

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to