Show the current context.
(self)
| 3961 | self.capitals, self.clamp, flags, traps)) |
| 3962 | |
| 3963 | def __repr__(self): |
| 3964 | """Show the current context.""" |
| 3965 | s = [] |
| 3966 | s.append('Context(prec=%(prec)d, rounding=%(rounding)s, ' |
| 3967 | 'Emin=%(Emin)d, Emax=%(Emax)d, capitals=%(capitals)d, ' |
| 3968 | 'clamp=%(clamp)d' |
| 3969 | % vars(self)) |
| 3970 | names = [f.__name__ for f, v in self.flags.items() if v] |
| 3971 | s.append('flags=[' + ', '.join(names) + ']') |
| 3972 | names = [t.__name__ for t, v in self.traps.items() if v] |
| 3973 | s.append('traps=[' + ', '.join(names) + ']') |
| 3974 | return ', '.join(s) + ')' |
| 3975 | |
| 3976 | def clear_flags(self): |
| 3977 | """Reset all flags to zero""" |