-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-98836: Extend PyUnicode_FromFormat() #98838
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
Merged
serhiy-storchaka
merged 15 commits into
python:main
from
serhiy-storchaka:capi-unicode-fromformat
May 21, 2023
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
aca2393
gh-98836: Extend PyUnicode_FromFormat()
serhiy-storchaka 4fdf596
Fix docs formatting.
serhiy-storchaka 13d4c97
Add tests for integer conversions.
serhiy-storchaka e69d8b0
Merge branch 'main' into capi-unicode-fromformat
serhiy-storchaka 3bd9d3e
Add more tests.
serhiy-storchaka 1e6094b
Finish documentation.
serhiy-storchaka 8942ca3
Merge branch 'main' into capi-unicode-fromformat
serhiy-storchaka 8481bda
Remove duplicated paragraph.
serhiy-storchaka 8885850
Address review comments.
serhiy-storchaka 9ffdb86
Fix syntax error in a comment.
serhiy-storchaka 9ca3764
Fix and refactor tests.
serhiy-storchaka 79a523c
Merge branch 'main' into capi-unicode-fromformat
serhiy-storchaka 91d8393
Add more tests for %ls and %lV.
serhiy-storchaka 9f2f5f2
Merge branch 'main' into capi-unicode-fromformat
serhiy-storchaka b86d92d
Try to silence Sphinx warnings.
serhiy-storchaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add something like
[[fill]align][sign][z][#][0][width][grouping_option][.precision][type]
? Example taken from: https://docs.python.org/dev/library/string.html#format-specification-mini-languageThe printf format is complex, and it's not obvious in which order each part should be written. I understand that it's something like:
Or if you prefer a shorter version:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the following paragraphs from the description of the print-like formatting in Python: https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting.
I think that it also can benefit from from similar changes, but let leave it to other issue.