Home | History | Annotate | Download | only in python2.7

Lines Matching defs:traps

82 >>> getcontext().traps[DivisionByZero] = 1
90 >>> c.traps[InvalidOperation] = 0
95 >>> c.traps[InvalidOperation] = 1
110 >>> c.traps[InvalidOperation] = 0
375 # List of public traps and flags
2360 # create a copy of the current context, with cleared flags/traps
2364 newcontext.traps[exception] = 0
3769 traps - If traps[exception] = 1, then the exception is
3783 traps=None, flags=None,
3806 if traps is None:
3807 self.traps = dc.traps.copy()
3808 elif not isinstance(traps, dict):
3809 self.traps = dict((s, int(s in traps)) for s in _signals)
3811 self.traps = traps
3828 names = [t.__name__ for t, v in self.traps.items() if v]
3829 s.append('traps=[' + ', '.join(names) + ']')
3839 nc = Context(self.prec, self.rounding, self.traps,
3846 nc = Context(self.prec, self.rounding, self.traps.copy(),
3866 if not self.traps[error]:
3946 >>> context = Context(prec=5, traps=[Inexact])
5861 traps=[DivisionByZero, Overflow, InvalidOperation],
5875 traps=[DivisionByZero, Overflow, InvalidOperation, Clamped, Underflow],
5881 traps=[],