def dehydrate_rating(rating_class):
 rating = rating_class()
 if (rating.label is None):
  rating.label = (str(rating.age) or slugify_iarc_name(rating))
 if (rating.name is None):
  if (rating.age == 0):
   rating.name = unicode(NAME_GENERAL)
  else:
   rating.name = (unicode(NAME_LAZY) % rating.age)
 rating.name = unicode(rating.name)
 return rating

def dehydrate_rating ( rating_class ) : rating = rating_class ( ) if ( rating . label is None ) : rating . label = ( str ( rating . age ) or slugify_iarc_name ( rating ) ) if ( rating . name is None ) : if ( rating . age == 0 ) : rating . name = unicode ( NAME_GENERAL ) else : rating . name = ( unicode ( NAME_LAZY ) % rating . age ) rating . name = unicode ( rating . name ) return rating
returns a rating with translated fields attached and with fields that are easily created dynamically .