parameters: (value, default=0)
docstring: Convert the value into an integer. If the
      conversion doesn't work it will return ``0``. You can
      override this default using the first parameter.
docstring_summary: Convert the value into an integer. If the
      conversion doesn't work it will return ``0``. You can
      override this default using the first parameter.
docstring_tokens: Convert the value into an integer . If the conversion doesn t work it will return 0 . You can override this default using the first parameter .
function: def do_int(value, default=0):
      """Convert the value into an integer. If the
      conversion doesn't work it will return ``0``. You can
      override this default using the first parameter.
      """
      try:
          return int(value)
      except (TypeError, ValueError):
          # this quirk is necessary so that "42.23"|int gives 42.
          try:
              return int(float(value))
          except (TypeError, ValueError):
              return default
function_tokens: def do_int ( value , default = 0 ) : try : return int ( value ) except ( TypeError , ValueError ) : # this quirk is necessary so that "42.23"|int gives 42. try : return int ( float ( value ) ) except ( TypeError , ValueError ) : return default