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
int(string, base) wrong answers #42509
Comments
This affects all Python releases to date. See <http://mail.python.org/pipermail/python-dev/2005- for discussion. The overflow check in PyOS_strtoul() is int('102002022201221111211', 3) = 0 |
Logged In: YES There is a special case (added by Guido back in 1997, r9327) print 2, int('100000000000000000000000000000000', 2) The old output is:: 2 4294967296 And the new one:: 2 4294967296 The old bugs should be tested for in |
Logged In: YES The patch I talked about is under request ID bpo-1462361. |
Logged In: YES Request bpo-1462361 also contains a patch for adding some tests |
Logged In: YES This was repaired via a variant of patch 1335972. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: