Lines Matching defs:flags
88 >>> print(c.flags[InvalidOperation])
93 >>> print(c.flags[InvalidOperation])
95 >>> c.flags[InvalidOperation] = 0
96 >>> print(c.flags[InvalidOperation])
104 >>> print(c.flags[InvalidOperation])
106 >>> c.flags[InvalidOperation] = 0
110 >>> print(c.flags[InvalidOperation])
413 FloatOperation in the context flags. Explicit conversions with
421 # List of public traps and flags
445 ['prec', 'Emin', 'Emax', 'capitals', 'clamp', 'rounding', 'flags', 'traps']
2373 # 1**other = 1, but the choice of exponent and the flags
2484 # create a copy of the current context, with cleared flags/traps
2495 if newcontext.flags[Subnormal]:
2503 if newcontext.flags[Overflow]:
2506 if newcontext.flags[exception]:
2594 # raise appropriate flags
2627 quiet: it raises no flags, and uses no information from the
2662 This operation is quiet: it raises no flags, and uses no
2683 the context. This method raises the Rounded and Inexact flags
2765 # correctly and raise the appropriate flags.
3088 # p+1 digits; final round will raise correct flags
3091 # p+1 digits; final round will raise correct flags
3581 # decide which flags to raise using value of ans
3892 flags - When an exception is caused, flags[exception] is set.
3903 capitals=None, clamp=None, flags=None, traps=None,
3905 # Set defaults; for everything except flags and _ignored_flags,
3931 if flags is None:
3932 self.flags = dict.fromkeys(_signals, 0)
3933 elif not isinstance(flags, dict):
3934 self.flags = dict((s, int(s in flags)) for s in _signals + flags)
3936 self.flags = flags
3980 elif name == 'flags' or name == 'traps':
3993 flags = [sig for sig, v in self.flags.items() if v]
3997 self.capitals, self.clamp, flags, traps))
4006 names = [f.__name__ for f, v in self.flags.items() if v]
4007 s.append('flags=[' + ', '.join(names) + ']')
4013 """Reset all flags to zero"""
4014 for flag in self.flags:
4015 self.flags[flag] = 0
4025 self.capitals, self.clamp, self.flags, self.traps,
4033 self.flags.copy(), self.traps.copy(),
4051 self.flags[error] = 1
4061 """Ignore all flags, if they are raised"""
4064 def _ignore_flags(self, *flags):
4065 """Ignore the flags, if they are raised"""
4068 self._ignored_flags = (self._ignored_flags + list(flags))
4069 return list(flags)
4071 def _regard_flags(self, *flags):
4072 """Stop ignoring the flags, if they are raised"""
4073 if flags and isinstance(flags[0], (tuple,list)):
4074 flags = flags[0]
4075 for flag in flags:
4248 >>> c.flags[InvalidOperation] = 0
4249 >>> print(c.flags[InvalidOperation])
4253 >>> print(c.flags[InvalidOperation])
4255 >>> c.flags[InvalidOperation] = 0
4256 >>> print(c.flags[InvalidOperation])
4260 >>> print(c.flags[InvalidOperation])
5572 of the operand as the precision setting; Inexact and Rounded flags
5602 of the operand as the precision setting, except that no flags will
6075 context.flags[FloatOperation] = 1
6091 flags=[],
6106 flags=[],
6112 flags=[],