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']
euro = '\u20ac'
self._test_currency(50000, "50000,00 " + euro)
self._test_currency(50000, "50 000,00 " + euro, grouping=True)
- # XXX is the trailing space a bug?
- self._test_currency(50000, "50 000,00 EUR ",
+ self._test_currency(50000, "50 000,00 EUR",
grouping=True, international=True)
--- /dev/null
+Removes trailing space in formatted currency with `international=True` and a locale with symbol following value.\r
+E.g. `locale.currency(12.34, international=True)` returned `'12,34 EUR '` instead of `'12,34 EUR'`.\r