def _register_lltd_specific_class(*attr_types):
 def _register(cls):
  for attr_type in attr_types:
   SPECIFIC_CLASSES[attr_type] = cls
  type_fld = LLTDAttribute.fields_desc[0].copy()
  type_fld.default = attr_types[0]
  cls.fields_desc = ([type_fld] + cls.fields_desc)
  return cls
 return _register

def _register_lltd_specific_class ( * attr_types ) : def _register ( cls ) : for attr_type in attr_types : SPECIFIC_CLASSES [ attr_type ] = cls type_fld = LLTDAttribute . fields_desc [ 0 ] . copy ( ) type_fld . default = attr_types [ 0 ] cls . fields_desc = ( [ type_fld ] + cls . fields_desc ) return cls return _register
this can be used as a class decorator; if we want to support python 2 .