gh-142019: Add description about the exponent of result formatted with presentation type 'e'.#142084
Merged
hugovk merged 2 commits intopython:mainfrom Dec 16, 2025
Merged
gh-142019: Add description about the exponent of result formatted with presentation type 'e'.#142084hugovk merged 2 commits intopython:mainfrom
hugovk merged 2 commits intopython:mainfrom
Conversation
skirpichev
reviewed
Nov 29, 2025
1nftf
commented
Dec 11, 2025
Contributor
Author
1nftf
left a comment
There was a problem hiding this comment.
The float.__format__ method internally calls PyOS_double_to_string.
The default PyOS_double_to_string implementation will pad the exponent to 2 digits and use a zero exponent for a zero value.
Line 1204 in 469f191
The fallback PyOS_double_to_string implementation will internally call PyOS_snprintf.
This also pad the exponent to 2 digits and use a zero exponent for a zero value.
Line 729 in 469f191
skirpichev
approved these changes
Dec 11, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 16, 2025
…ed with presentation type 'e' (pythonGH-142084) (cherry picked from commit e27f76b) Co-authored-by: 1nftf <QfxZ11@proton.me>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 16, 2025
…ed with presentation type 'e' (pythonGH-142084) (cherry picked from commit e27f76b) Co-authored-by: 1nftf <QfxZ11@proton.me>
|
GH-142813 is a backport of this pull request to the 3.14 branch. |
|
GH-142814 is a backport of this pull request to the 3.13 branch. |
hugovk
pushed a commit
that referenced
this pull request
Dec 16, 2025
hugovk
pushed a commit
that referenced
this pull request
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Documentation preview 📚: https://cpython-previews--142084.org.readthedocs.build/