-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-130664: specify how thousands separators are used with 0-padding #131030
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/library/string.rst
Outdated
@@ -426,7 +426,9 @@ If not specified, then the field width will be determined by the content. | |||
When no explicit alignment is given, preceding the *width* field by a zero | |||
(``'0'``) character enables sign-aware zero-padding for numeric types, | |||
excluding :class:`complex`. This is equivalent to a *fill* character of | |||
``'0'`` with an *alignment* type of ``'='``. | |||
``'0'`` with an *alignment* type of ``'='``. If digit group separators of the |
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'm a bit surprised that "digit group separator" is mentioned here while we only mention it in the "grouping option" paragraph below. Maybe we should mention it at that place or mention here that this will be introduced below?
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.
Since the different parts of the format are interconnected, there may be references to options described in details below.
But I think that we should unify wording and avoid repetition of what specifies the grouping option. "If the grouping option for the integral part is used, a digit group separator is also inserted between leading zeros."
📚 Documentation preview 📚: https://cpython-previews--131030.org.readthedocs.build/