-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-38536: Removes trailing space in formatted currency #16864
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
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
@@ -279,6 +279,8 @@ def currency(val, symbol=True, grouping=False, international=False): | |||
if precedes: | |||
s = smb + (separated and ' ' or '') + s | |||
else: | |||
if international and smb[-1] == ' ': | |||
smb = smb[:-1] |
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.
why don't use rstrip()?
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.
To be more specific about the case (1 trailing space).
@sanjo Don't forget sign cla |
CLA has been signed and https://check-python-cla.herokuapp.com/ also gave back success. |
Thanks for fixing this bug. Can you please write the news entry. |
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 don't know if write the example is a good improve. but LGTM :-)
Just FYI, the CLA has been signed by me. The bot seems to have some quirk with removing the label. Let me know if there is anything else necessary from my side for this pull request to be merged. |
We check CLA record for everyone who made commit to the PR, not just the person who opened the PR. The code seems to be committed by user "A A", and perhaps "A A" has not signed CLA. Either have A A sign the CLA (and create bpo account) or modify this PR so it only contains your own commit. |
…ional=True and symbol following value Validated that Ubuntu was affected and Windows 10 was not affected. Fix considers both cases.
@Mariatta I have fixed the commit to contain the proper author and committer. There was just some configuration for Git missing on my newly setup computer. Best regards. |
Have you tried all locale on Ubuntu and Windows? |
No, I have not tried the all locale on Ubuntu and Windows.
The output on Windows 10 has no trailing space. |
Misc/NEWS.d/next/Library/2019-10-21-20-24-51.bpo-38536.beZ0Sk.rst
Outdated
Show resolved
Hide resolved
Co-Authored-By: Inada Naoki <[email protected]>
with international=True and symbol following value.
Validated that Ubuntu was affected
and Windows 10 was not affected.
Fix considers both cases.
https://bugs.python.org/issue38536