Message83697
New version of decimal_n_format.patch, with support for the thousands
separator (PEP 378). As discussed on python-dev, during zero-padding the
patched code adds an extra '0' on the left to avoid a leading ',' if
necessary. For example:
>>> format(Decimal('123456'), '08,')
'0,123,456'
The Decimal.__format__ method (and support code) had to be fairly
significantly reworked. However, I'm reasonably confident that this code
is correct: a patch review would be welcome if anyone has the time;
otherwise I'll commit this in a couple of days or so. |
|
Date |
User |
Action |
Args |
2009-03-17 21:18:40 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, facundobatista, eric.smith |
2009-03-17 21:18:40 | mark.dickinson | set | messageid: <1237324720.46.0.178540193331.issue2110@psf.upfronthosting.co.za> |
2009-03-17 21:17:48 | mark.dickinson | link | issue2110 messages |
2009-03-17 21:17:48 | mark.dickinson | create | |
|