[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-03-12 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in 2.7, 3.1, 3.2, 3.3. Closing. -- resolution: -> fixed status: open -> closed versions: +Python 3.1 ___ Python tracker ___ ___

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-03-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c4be28cda5b by Mark Dickinson in branch '3.1': Issue 11131: Fix sign of zero result on decimal.Decimal plus and minus operations in ROUND_FLOOR rounding mode. http://hg.python.org/cpython/rev/1c4be28cda5b New changeset 426057570bee by Mark Dickin

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-03-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset d5fe8b33f711 by Mark Dickinson in branch '2.7': Issue 11131: Fix sign of zero result on plus and minus operations in ROUND_FLOOR rounding mode. http://hg.python.org/cpython/rev/d5fe8b33f711 -- nosy: +python-dev ___

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, good point about the context; thanks for the updated patch. Yes, those missing regression tests are a problem; this isn't the first time that the above problem has appeared. -- ___ Python tracker

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-07 Thread Stefan Krah
Stefan Krah added the comment: The patch and the test cases look good, but the implicit context must be looked up earlier now (see the altered patch). I just realize that there aren't any regression tests for this sort of situation, since for the main tests we are only testing the context metho

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: Nice catch! Please could you test the attached patch (against py3k)? I'll apply it after 3.2 is out. The fix should also go into the 2.7 maintenance branch, I think. -- assignee: -> mark.dickinson keywords: +patch versions: +Python 2.7 Added file:

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-05 Thread Stefan Krah
New submission from Stefan Krah : Another exciting corner case in plus/minus: "The operations are evaluated using the same rules as add and subtract; the operations plus(a) and minus(a) (where a and b refer to any numbers) are calculated as the operations add(’0’, a) and subtract(’0’, b) resp