(self, rounding=None, context=None)
Rounds to the nearest integer, without raising inexact, rounded.
Rounds to the nearest integer, without raising inexact, rounded.
Rounds to the nearest integer without raising inexact rounded .
def to_integral_value(self, rounding=None, context=None):
        """Rounds to the nearest integer, without raising inexact, rounded."""
        if context is None:
            context = getcontext()
        if rounding is None:
            rounding = context.rounding
        if self._is_special:
            ans = self._check_nans(context=context)
            if ans:
                return ans
            return Decimal(self)
        if self._exp >= 0:
            return Decimal(self)
        else:
            return self._rescale(0, rounding)
def to_integral_value ( self , rounding = None , context = None ) : if context is None : context = getcontext ( ) if rounding is None : rounding = context . rounding if self . _is_special : ans = self . _check_nans ( context = context ) if ans : return ans return Decimal ( self ) if self . _exp >= 0 : return Decimal ( self ) else : return self . _rescale ( 0 , rounding )