classification
Title: Bug fixes and cleanup for decimal.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: facundobatista, nnorwitz, rhettinger (3)
Priority: normal Keywords patch

Created on 2004-10-17 16:33 by nnorwitz, last changed 2004-10-20 07:00 by rhettinger.

Files
File name Uploaded Description Edit Remove
decimal.patch nnorwitz, 2004-10-17 16:33 patch 1
Messages (3)
msg47083 - (view) Author: Neal Norwitz (nnorwitz) Date: 2004-10-17 16:33
Bug fixes:  == was used in 2 places where it looked
like assignment was intended.

-        context._rounding_decision == ALWAYS_ROUND
+        context._rounding_decision = ALWAYS_ROUND

Cleanups: remove unused import and unused local variables.
msg47084 - (view) Author: Facundo Batista (facundobatista) Date: 2004-10-20 00:57
Logged In: YES 
user_id=752496

Raymond:

The cleanups are OK.

Regarding changing == for =, didn't find nothing in the Spec
that says that after max() and min() you should *always*
round. So, I'll go for droping the line. But the tests are
OK with and without the assingment (IOW, with == and with
=), which makes me doubt.

I'm assigning this to you because I'm not sure about
commiting after beta.

Thanks!

.    Facundo
msg47085 - (view) Author: Raymond Hettinger (rhettinger) Date: 2004-10-20 07:00
Logged In: YES 
user_id=80475

Accepted and applied (with small modifications):
   Lib/decimal.py 1.28

Facundo, rounding is required by the spec when it says that 
the selected value should have the effect of a unary plus.
History
Date User Action Args
2004-10-17 16:33:14nnorwitzcreate