MCPcopy Index your code
hub / github.com/python/cpython / system_listMethods

Method system_listMethods

Lib/xmlrpc/server.py:279–295  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

277 return response.encode(self.encoding, 'xmlcharrefreplace')
278
279 def system_listMethods(self):
280 """system.listMethods() => ['add', 'subtract', 'multiple']
281
282 Returns a list of the methods supported by the server."""
283
284 methods = set(self.funcs.keys())
285 if self.instance is not None:
286 # Instance can implement _listMethod to return a list of
287 # methods
288 if hasattr(self.instance, '_listMethods'):
289 methods |= set(self.instance._listMethods())
290 # if the instance has a _dispatch method then we
291 # don't have enough information to provide a list
292 # of methods
293 elif not hasattr(self.instance, '_dispatch'):
294 methods |= set(list_public_methods(self.instance))
295 return sorted(methods)
296
297 def system_methodSignature(self, method_name):
298 """system.methodSignature('add') => [double, int, int]

Callers 1

Calls 3

setFunction · 0.85
list_public_methodsFunction · 0.85
keysMethod · 0.45

Tested by

no test coverage detected