def convert_repr_number(number):
 sep = ''
 dec = ''
 part_one = '0'
 part_two = ''
 for digit in number:
  if digit.isdigit():
   if (sep == ''):
    part_one += digit
   else:
    part_two += digit
  elif ((digit == '-') and (part_one == '0')):
   part_one = '-0'
  elif ((sep == '') and (sep != digit)):
   sep = digit
  elif (dec == ''):
   dec = digit
   part_two += '.'
  else:
   return False
 if (dec == ''):
  return float(('%s.%s' % (part_one, part_two)))
 else:
  return float(('%s%s' % (part_one, part_two)))

def convert_repr_number ( number ) : sep = '' dec = '' part_one = '0' part_two = '' for digit in number : if digit . isdigit ( ) : if ( sep == '' ) : part_one += digit else : part_two += digit elif ( ( digit == '-' ) and ( part_one == '0' ) ) : part_one = '-0' elif ( ( sep == '' ) and ( sep != digit ) ) : sep = digit elif ( dec == '' ) : dec = digit part_two += '.' else : return False if ( dec == '' ) : return float ( ( '%s.%s' % ( part_one , part_two ) ) ) else : return float ( ( '%s%s' % ( part_one , part_two ) ) )
helper function to convert a string representation back to a number .