def has_dataproviders(cls):
 if (not hasattr(cls, _DATAPROVIDER_CLASS_MAP_KEY)):
  setattr(cls, _DATAPROVIDER_CLASS_MAP_KEY, {})
 else:
  existing_dataproviders = getattr(cls, _DATAPROVIDER_CLASS_MAP_KEY)
  copied_dataproviders = copy.deepcopy(existing_dataproviders)
  setattr(cls, _DATAPROVIDER_CLASS_MAP_KEY, copied_dataproviders)
 dataproviders = getattr(cls, _DATAPROVIDER_CLASS_MAP_KEY)
 for (attr_key, attr_value) in cls.__dict__.iteritems():
  if (callable(attr_value) and (not attr_key.startswith('__')) and getattr(attr_value, _DATAPROVIDER_METHOD_NAME_KEY, None)):
   name = getattr(attr_value, _DATAPROVIDER_METHOD_NAME_KEY)
   dataproviders[name] = attr_value
 return cls

def has_dataproviders ( cls ) : if ( not hasattr ( cls , _DATAPROVIDER_CLASS_MAP_KEY ) ) : setattr ( cls , _DATAPROVIDER_CLASS_MAP_KEY , { } ) else : existing_dataproviders = getattr ( cls , _DATAPROVIDER_CLASS_MAP_KEY ) copied_dataproviders = copy . deepcopy ( existing_dataproviders ) setattr ( cls , _DATAPROVIDER_CLASS_MAP_KEY , copied_dataproviders ) dataproviders = getattr ( cls , _DATAPROVIDER_CLASS_MAP_KEY ) for ( attr_key , attr_value ) in cls . __dict__ . iteritems ( ) : if ( callable ( attr_value ) and ( not attr_key . startswith ( '__' ) ) and getattr ( attr_value , _DATAPROVIDER_METHOD_NAME_KEY , None ) ) : name = getattr ( attr_value , _DATAPROVIDER_METHOD_NAME_KEY ) dataproviders [ name ] = attr_value return cls
wraps a class .