parameters: (self, rounding=None, context=None)
docstring: Rounds to the nearest integer, without raising inexact, rounded.
docstring_summary: Rounds to the nearest integer, without raising inexact, rounded.
docstring_tokens: Rounds to the nearest integer without raising inexact rounded .
function: 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)
function_tokens: 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 )