diff options
author | Inada Naoki <songofacandy@gmail.com> | 2020-01-20 03:45:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 03:45:50 (GMT) |
commit | e96d954527aa376457451e32a9d75ae3ea9ab4bd (patch) | |
tree | d5e8e7d8d79097d8d420d65fa055cef116f72934 /Lib/locale.py | |
parent | d8ef64422a75f40cecdb1a7ee43492607d3daaf6 (diff) | |
download | cpython-e96d954527aa376457451e32a9d75ae3ea9ab4bd.zip cpython-e96d954527aa376457451e32a9d75ae3ea9ab4bd.tar.gz cpython-e96d954527aa376457451e32a9d75ae3ea9ab4bd.tar.bz2 |
bpo-38536: locale: Remove trailing space in formatted currency (GH-16864)
Diffstat (limited to 'Lib/locale.py')
-rw-r--r-- | Lib/locale.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/locale.py b/Lib/locale.py index dd8a085..1a4e9f6 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -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] s = s + (separated and ' ' or '') + smb sign_pos = conv[val<0 and 'n_sign_posn' or 'p_sign_posn'] |