Message322885
We use locale.format('%.2f', x, True) to convert Decimal values to strings for display. Unfortunately, the locale module is using %-formatting to generate the initial string before applying locale specific formatting. As a result, any value which cannot be accurately represented as a float will produce incorrect results.
I've built some formatting that uses new-style string formatting (and some internal locale functions) which corrects the problem.
Unfortunately, making this change in the locale module would require converting the input format string to the new syntax, so '%.2f' would become '{:.2f}'.
See also #33731 |
|
Date |
User |
Action |
Args |
2018-08-01 20:22:51 | jemerton | set | recipients:
+ jemerton |
2018-08-01 20:22:51 | jemerton | set | messageid: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> |
2018-08-01 20:22:51 | jemerton | link | issue34311 messages |
2018-08-01 20:22:51 | jemerton | create | |
|