parameters: (self)
docstring: Converts self to an int, truncating if necessary.
docstring_summary: Converts self to an int, truncating if necessary.
docstring_tokens: Converts self to an int truncating if necessary .
function: def __int__(self):
          """Converts self to an int, truncating if necessary."""
          if self._is_special:
              if self._isnan():
                  raise ValueError("Cannot convert NaN to integer")
              elif self._isinfinity():
                  raise OverflowError("Cannot convert infinity to integer")
          s = (-1)**self._sign
          if self._exp >= 0:
              return s*int(self._int)*10**self._exp
          else:
              return s*int(self._int[:self._exp] or '0')
function_tokens: def __int__ ( self ) : if self . _is_special : if self . _isnan ( ) : raise ValueError ( "Cannot convert NaN to integer" ) elif self . _isinfinity ( ) : raise OverflowError ( "Cannot convert infinity to integer" ) s = ( - 1 ) ** self . _sign if self . _exp >= 0 : return s * int ( self . _int ) * 10 ** self . _exp else : return s * int ( self . _int [ : self . _exp ] or '0' )