when flags get setthey stay set until they are cleared using the clear_flags(method thusone could perform an entire sequence of calculations and only check for errors at the end the settings on an existing context object can be changed through the following attributes and methodsc capitals flag set to or that determines whether to use or as the exponent character emax integer specifying maximum exponent emin integer specifying minimum exponent prec integer specifying digits of precision flags dictionary containing current flag values corresponding to signals for examplec flags[roundedreturns the current flag value for the rounded signal rounding rounding rule in effect an example is round_half_even traps dictionary containing true/false settings for the signals that result in python exceptions for examplec traps[divisionbyzerois usually truewhereas traps[roundedis false clear_flags(resets all sticky flags (clears flagsc copy(returns copy of context create_decimal(valuecreates new decimal object using as the context this may be useful in generating numbers whose precision and rounding behavior override that of the default context functions and constants the following functions and constants are defined by the decimal module getcontext(returns the current decimal context each thread has its own decimal context so this returns the context of the calling thread lib fl ff