Mark Dickinson <dicki...@gmail.com> added the comment: 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. ---------- stage: -> commit review type: -> behavior Added file: http://bugs.python.org/file13353/decimal_n_format2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2110> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com