[issue2110] Implement __format__ for Decimal

2009-03-17 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Mark, this looks fine. Can you add support for PEP 378? -- assignee: rhettinger - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2110

[issue2110] Implement __format__ for Decimal

2009-03-17 Thread Mark Dickinson
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:

[issue2110] Implement __format__ for Decimal

2009-03-17 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The tests you submitted are reassuring. I think you should go ahead and commit this. -- resolution: - accepted ___ Python tracker rep...@bugs.python.org

[issue2110] Implement __format__ for Decimal

2009-03-17 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Committed, r70439 and r70440. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2110 ___

[issue2110] Implement __format__ for Decimal

2009-03-13 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch to implement the 'n' format specifier for Decimals (see also issue 5481). Raymond, could you give this a sanity check? -- assignee: marketdickinson - rhettinger Added file:

[issue2110] Implement __format__ for Decimal

2009-03-13 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: accepted - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2110 ___ ___

[issue2110] Implement __format__ for Decimal

2009-03-13 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Sure, I will take a look. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2110 ___

[issue2110] Implement __format__ for Decimal

2009-03-12 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Adding support for the 'n' format specifier should be done before 3.1 goes out. -- priority: high - critical versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 ___ Python tracker

[issue2110] Implement __format__ for Decimal

2008-12-05 Thread Mark Dickinson
Changes by Mark Dickinson [EMAIL PROTECTED]: -- priority: - high ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2110 ___ ___ Python-bugs-list mailing

[issue2110] Implement __format__ for Decimal

2008-06-20 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Reopening this; I'd like to have a second go at implementing the 'n' format specifier for the Decimal type. See issue 2802 for hints about how to go about this. -- assignee: facundobatista - marketdickinson

[issue2110] Implement __format__ for Decimal

2008-06-20 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- status: closed - open ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2110 ___ ___ Python-bugs-list

[issue2110] Implement __format__ for Decimal

2008-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a first attempt at Decimal.__format__; the patch is against the trunk, and should be forward ported as usual to 3.0, with obvious minor changes related to str/unicode. It still needs some cleanup and some more tests, but I'm posting it now in the hope

[issue2110] Implement __format__ for Decimal

2008-02-14 Thread Mark Dickinson
Mark Dickinson added the comment: I can take a look at this if you like. But I don't want to spoil your fun :) -- nosy: +marketdickinson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2110 __