def inspect_getmembers(object, predicate=None):
 results = []
 for key in dir(object):
  try:
   value = getattr(object, key)
  except AttributeError:
   continue
  if ((not predicate) or predicate(value)):
   results.append((key, value))
 results.sort()
 return results
 def _is_show_member(self, name):
  if self.show_inherited_members:
   return True
  if (name not in self._cls.__dict__):
   return False
  return True

def inspect_getmembers ( object , predicate = None ) : results = [ ] for key in dir ( object ) : try : value = getattr ( object , key ) except AttributeError : continue if ( ( not predicate ) or predicate ( value ) ) : results . append ( ( key , value ) ) results . sort ( ) return results def _is_show_member ( self , name ) : if self . show_inherited_members : return True if ( name not in self . _cls . __dict__ ) : return False return True
return all members of an object as pairs sorted by name .