diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-05-04 02:25:46 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-05-04 02:25:46 (GMT) |
commit | 71f3b85497f25bad3b00555173c51378f64edbb5 (patch) | |
tree | cf8f7b12ae581dcad6146560493b978b1a889b69 /Lib | |
parent | 8aca9d032e7813da9a23fd0771c008aff5a5e62f (diff) | |
download | cpython-71f3b85497f25bad3b00555173c51378f64edbb5.zip cpython-71f3b85497f25bad3b00555173c51378f64edbb5.tar.gz cpython-71f3b85497f25bad3b00555173c51378f64edbb5.tar.bz2 |
Make sure that Context traps and flags dictionaries have values 0 and 1
(as documented) rather than True and False.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/decimal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 6a70ed0..940a9d2 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -3613,10 +3613,10 @@ class Context(object): if _ignored_flags is None: _ignored_flags = [] if not isinstance(flags, dict): - flags = dict([(s,s in flags) for s in _signals]) + flags = dict([(s, int(s in flags)) for s in _signals]) del s if traps is not None and not isinstance(traps, dict): - traps = dict([(s,s in traps) for s in _signals]) + traps = dict([(s, int(s in traps)) for s in _signals]) del s for name, val in locals().items(): if val is None: |