def all_methods(obj):
 temp = []
 for name in dir(obj):
  func = getattr(obj, name)
  if hasattr(func, '__call__'):
   temp.append(name)
 return temp

def all_methods ( obj ) : temp = [ ] for name in dir ( obj ) : func = getattr ( obj , name ) if hasattr ( func , '__call__' ) : temp . append ( name ) return temp
return a list of names of methods of obj .