Repository navigation
gh-136250: Document that int to str conversion can slightly exceed the digit limit - #136279
Conversation
…ersion limits in stdtypes documentation
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
CC @terryjreedy |
|
This PR is stale because it has been open for 30 days with no activity. |
|
This PR is stale because it has been open for 90 days with no activity. |
📖 311 files changed · 10 added · 301 modified
Preview · build overview · cpython-previews · built Dec. 6, 2026, 4:59 p.m. UTC |
|
@KentaroJay, could you please resolve merge conflicts? |
OK, let me do it in a minute |
I guess, this newer be signed. Could you please redo the last commit (only) and do a force-push without claude?
No need to reply each time to every comment from reviewer. Just do what you were asked for, if you accept suggestion. |
116e21c to
1e5e192
Compare
| For integer to string conversions, the limit is applied to an estimated | ||
| size of the result. |
There was a problem hiding this comment.
| For integer to string conversions, the limit is applied to an estimated | |
| size of the result. | |
| For integer to string conversions with large limits, the check is | |
| based on an estimate of the result size, so the result may slightly | |
| exceed the limit. |
There was a problem hiding this comment.
IMO, "with large limits" is useless, it give no glue on when actually it happens.
Maybe this: "For integer to string conversions, the check is based on an estimate of the lower bound of the result size." ?
PS: See #96537 for details.
There was a problem hiding this comment.
I pushed a commit that combines both suggestions:
For integer to string conversions, the check is based on an estimate of
the lower bound of the result size, so the result may slightly exceed
the limit.
Does this wording work for both of you?
|
Thanks @KentaroJay for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
GH-163247 is a backport of this pull request to the 3.15 branch. |
|
GH-163248 is a backport of this pull request to the 3.14 branch. |
sys.set_int_max_str_digitslimit is not enforced for large integers #136250📚 Documentation preview 📚: https://cpython-previews--136279.org.readthedocs.build/