Message379681
And just to show that python is doing the right thing, if the locale is set up correctly, I'll show the following hack:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'en_US')
'en_US'
>>> locale.currency(24.99)
'$24.99'
>>> locale._override_localeconv["p_cs_precedes"] = 0
>>> locale.currency(24.99)
'24.99$'
Notice the change from '$24.99' to '24.99$' when I change p_cs_precedes to 0.
WARNING: you really, really shouldn't use _override_localeconv. It looks like it exists just for testing, but I'm using it here to show that currency formatting does respect p_cs_precedes.
On the other hand, I've often wanted to build up a locale programmatically and then use it, so maybe we should support that use case. |
|
Date |
User |
Action |
Args |
2020-10-26 18:58:45 | eric.smith | set | recipients:
+ eric.smith, lemburg, GiftZwergrapper |
2020-10-26 18:58:45 | eric.smith | set | messageid: <1603738725.22.0.24586376652.issue42156@roundup.psfhosted.org> |
2020-10-26 18:58:45 | eric.smith | link | issue42156 messages |
2020-10-26 18:58:45 | eric.smith | create | |
|