def get_nom_val(atrv):
 r_nominal = re.compile('{(.+)}')
 m = r_nominal.match(atrv)
 if m:
  return tuple((i.strip() for i in m.group(1).split(',')))
 else:
  raise ValueError('This does not look like a nominal string')

def get_nom_val ( atrv ) : r_nominal = re . compile ( '{(.+)}' ) m = r_nominal . match ( atrv ) if m : return tuple ( ( i . strip ( ) for i in m . group ( 1 ) . split ( ',' ) ) ) else : raise ValueError ( 'This does not look like a nominal string' )
given a string containing a nominal type .