This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: decimal.py signal/exception fix
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: goodger, rhettinger
Priority: normal Keywords: patch

Created on 2004-07-08 13:55 by goodger, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
decimal.py.diff goodger, 2004-07-08 13:57 patch to dist/src/Lib/decimal.py
Messages (3)
msg46331 - (view) Author: David Goodger (goodger) (Python committer) Date: 2004-07-08 13:55
Traps should be set on signals, not conditions. 
decimal.Signals in the implementation is actually
listing conditions.

The attached patch brings the implementation into line
with the spec & PEP 327.  decimal.Signals is changed to
list signals, not conditions. Context._raise_error is
modified to handle signals properly.

19 tests fail in test_decimal.py, but I'm not sure how
to fix it.
msg46332 - (view) Author: David Goodger (goodger) (Python committer) Date: 2004-07-08 14:06
Logged In: YES 
user_id=7733

It's a start.  The docs would also need changes to explain
the difference between signals and conditions, and how to
enable traps.

A boolean "signal" attribute on exceptions may help.  Set
DecimalException.signal to False, set .signal on individual
signal exceptions to True, and .signal on InvalidOperation
subclasses to False.
msg46333 - (view) Author: David Goodger (goodger) (Python committer) Date: 2004-07-10 03:19
Logged In: YES 
user_id=7733

Fixed in decimal.py revision 1.13.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40524
2004-07-08 13:55:46goodgercreate