-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys.set_int_max_str_digits ValueError Message is Inaccurate #127238
Comments
cc @skirpichev |
Passing 639 raises the ValueError, so 640 is the lower limit as documented: "The lowest limit that can be configured is 640 digits as provided in sys.int_info.str_digits_check_threshold. Indeed (EDITED)
So, /larger than/at least/ in the error message, wherever it lives. (I am guessing that 640 = 8 lines of 80 digits.) |
Now it's correct and closer to Python/initconfig.c
I would guess it's just a joke, referring to other famous quote (or to the myth about...) :D In
Here is a small pr, doing something like that: #127241 |
…7241) Now it's correct and closer to Python/initconfig.c
The sys.set_int_max_str_digits ValueError message is shown to be inaccurate in the following Python interpreter execution sequence:
The sys.set_int_max_str_digits ValueError message states that "maxdigits" must be larger than "640." However, "sys.set_int_max_str_digits(maxdigits=640)" is a valid statement for Python to execute. Because argument "640" is valid for built-in function "sys.set_int_max_str_digits" and 640 is not larger than 640, this results in a discrepancy between what the ValueError message states as true and what is actually true.
Linked PRs
The text was updated successfully, but these errors were encountered: