[Patches] [ python-Patches-987300 ] decimal.py signal/exception fix
SourceForge.net
noreply at sourceforge.net
Sat Jul 10 05:19:22 CEST 2004
Patches item #987300, was opened at 2004-07-08 09:55
Message generated for change (Comment added) made by goodger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=987300&group_id=5470
Category: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: David Goodger (goodger)
Assigned to: Raymond Hettinger (rhettinger)
Summary: decimal.py signal/exception fix
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: David Goodger (goodger)
Date: 2004-07-09 23:19
Message:
Logged In: YES
user_id=7733
Fixed in decimal.py revision 1.13.
----------------------------------------------------------------------
Comment By: David Goodger (goodger)
Date: 2004-07-08 10:06
Message:
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=987300&group_id=5470
More information about the Patches
mailing list