def parse_date_or_fatal(str, fatal):
 try:
  date = float(str)
 except ValueError as e:
  raise fatal(('invalid date format (should be a float): %r' % e))
 else:
  return date

def parse_date_or_fatal ( str , fatal ) : try : date = float ( str ) except ValueError as e : raise fatal ( ( 'invalid date format (should be a float): %r' % e ) ) else : return date
parses the given date or calls option .