def _r_ha(self, attr):
try:
attr = getattr(self.delegate or self,attr)
if type(attr) in (UnboundMethodType, MethodType, BuiltinMethodType):
return 1 # method
except:
pass
return 2 # attribute