Skip to content

sys.set_int_max_str_digits ValueError Message is Inaccurate #127238

Closed
@amhamor

Description

@amhamor

The sys.set_int_max_str_digits ValueError message is shown to be inaccurate in the following Python interpreter execution sequence:

>>> import sys
>>> sys.set_int_max_str_digits(maxdigits=639)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: maxdigits must be 0 or larger than 640
>>> sys.set_int_max_str_digits(maxdigits=640)
>>>

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions