Commit abf8a56e authored by Raymond Hettinger's avatar Raymond Hettinger

Don't use mutable values for method defaults.

parent f3958f16
......@@ -2161,11 +2161,15 @@ class Context(object):
"""
def __init__(self, prec=None, rounding=None,
traps=None, flags=[],
traps=None, flags=None,
_rounding_decision=None,
Emin=None, Emax=None,
capitals=None, _clamp=0,
_ignored_flags=[]):
_ignored_flags=None):
if flags is None:
flags = []
if _ignored_flags is None:
_ignored_flags = []
if not isinstance(flags, dict):
flags = dict([(s,s in flags) for s in _signals])
del s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment