def ParseInteger(text, is_signed=False, is_long=False):
 try:
  result = int(text, 0)
 except ValueError:
  raise ValueError(("Couldn't parse integer: %s" % text))
 checker = _INTEGER_CHECKERS[((2 * int(is_long)) + int(is_signed))]
 checker.CheckValue(result)
 return result

def ParseInteger ( text , is_signed = False , is_long = False ) : try : result = int ( text , 0 ) except ValueError : raise ValueError ( ( "Couldn't parse integer: %s" % text ) ) checker = _INTEGER_CHECKERS [ ( ( 2 * int ( is_long ) ) + int ( is_signed ) ) ] checker . CheckValue ( result ) return result
parses an integer .