From: Mark Dickinson Date: Sun, 4 May 2008 02:25:46 +0000 (+0000) Subject: Make sure that Context traps and flags dictionaries have values 0 and 1 X-Git-Tag: v2.6a3~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71f3b85497f25bad3b00555173c51378f64edbb5;p=thirdparty%2FPython%2Fcpython.git Make sure that Context traps and flags dictionaries have values 0 and 1 (as documented) rather than True and False. --- diff --git a/Lib/decimal.py b/Lib/decimal.py index 6a70ed0548d4..940a9d24d44c 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: