def _parse_creation(creation_string, field_name):
 split_creation_string = creation_string.split('.', 1)
 if (len(split_creation_string) != 2):
  raise _CreationFormatError(('Could not parse creation %s in field %s.' % (creation_string, field_name)))
 (timestamp_string, microsecond) = split_creation_string
 try:
  timestamp = time.strptime(timestamp_string, _BASE_CREATION_HEADER_FORMAT)
  microsecond = int(microsecond)
 except ValueError:
  raise _CreationFormatError(('Could not parse creation %s in field %s.' % (creation_string, field_name)))
 return datetime.datetime(*(timestamp[:6] + tuple([microsecond])))

def _parse_creation ( creation_string , field_name ) : split_creation_string = creation_string . split ( '.' , 1 ) if ( len ( split_creation_string ) != 2 ) : raise _CreationFormatError ( ( 'Could not parse creation %s in field %s.' % ( creation_string , field_name ) ) ) ( timestamp_string , microsecond ) = split_creation_string try : timestamp = time . strptime ( timestamp_string , _BASE_CREATION_HEADER_FORMAT ) microsecond = int ( microsecond ) except ValueError : raise _CreationFormatError ( ( 'Could not parse creation %s in field %s.' % ( creation_string , field_name ) ) ) return datetime . datetime ( * ( timestamp [ : 6 ] + tuple ( [ microsecond ] ) ) )
parses upload creation string from header format .