(self)
return sorted(methods)
system.listMethods() => ['add', 'subtract', 'multiple']

        Returns a list of the methods supported by the server.
system.listMethods() => ['add', 'subtract', 'multiple']
system . listMethods () = > [ add subtract multiple ]
def system_listMethods(self):
        """system.listMethods() => ['add', 'subtract', 'multiple']

        Returns a list of the methods supported by the server."""

        methods = set(self.funcs.keys())
        if self.instance is not None:
            # Instance can implement _listMethod to return a list of
            # methods
            if hasattr(self.instance, '_listMethods'):
                methods |= set(self.instance._listMethods())
            # if the instance has a _dispatch method then we
            # don't have enough information to provide a list
            # of methods
            elif not hasattr(self.instance, '_dispatch'):
                methods |= set(list_public_methods(self.instance))
        return sorted(methods)
def system_listMethods ( self ) : methods = set ( self . funcs . keys ( ) ) if self . instance is not None : # Instance can implement _listMethod to return a list of # methods if hasattr ( self . instance , '_listMethods' ) : methods |= set ( self . instance . _listMethods ( ) ) # if the instance has a _dispatch method then we # don't have enough information to provide a list # of methods elif not hasattr ( self . instance , '_dispatch' ) : methods |= set ( list_public_methods ( self . instance ) ) return sorted ( methods )