parameters: (num, precision=0)
return_statement: return ('%d' % num)
docstring: Deprecated, todo: remove references from subclasses
docstring_summary: Deprecated, todo: remove references from subclasses
docstring_tokens: Deprecated todo : remove references from subclasses
function: def truncate_to_string(num, precision=0):
          """Deprecated, todo: remove references from subclasses"""
          if precision > 0:
              parts = ('{0:.%df}' % precision).format(Decimal(num)).split('.')
              decimal_digits = parts[1][:precision].rstrip('0')
              decimal_digits = decimal_digits if len(decimal_digits) else '0'
              return parts[0] + '.' + decimal_digits
          return ('%d' % num)
function_tokens: def truncate_to_string ( num , precision = 0 ) : if precision > 0 : parts = ( '{0:.%df}' % precision ) . format ( Decimal ( num ) ) . split ( '.' ) decimal_digits = parts [ 1 ] [ : precision ] . rstrip ( '0' ) decimal_digits = decimal_digits if len ( decimal_digits ) else '0' return parts [ 0 ] + '.' + decimal_digits return ( '%d' % num )