def get_instance_public_methods(instance):
 instance_members = inspect.getmembers(instance)
 instance_methods = {}
 for (name, member) in instance_members:
  if (not name.startswith('_')):
   if inspect.ismethod(member):
    instance_methods[name] = member
 return instance_methods

def get_instance_public_methods ( instance ) : instance_members = inspect . getmembers ( instance ) instance_methods = { } for ( name , member ) in instance_members : if ( not name . startswith ( '_' ) ) : if inspect . ismethod ( member ) : instance_methods [ name ] = member return instance_methods
retrieves an objects public methods .