def convert_string_to_number(value):
 if (value is None):
  return 1
 if isinstance(value, int):
  return value
 if value.isdigit():
  return int(value)
 num_list = map((lambda s: hashnum(s)), re.findall((numbers + '+'), value, re.IGNORECASE))
 return sum(num_list)

def convert_string_to_number ( value ) : if ( value is None ) : return 1 if isinstance ( value , int ) : return value if value . isdigit ( ) : return int ( value ) num_list = map ( ( lambda s : hashnum ( s ) ) , re . findall ( ( numbers + '+' ) , value , re . IGNORECASE ) ) return sum ( num_list )
convert strings to numbers .