本文整理汇总了Python中SimpleXMLRPCServer.remove_duplicates方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleXMLRPCServer.remove_duplicates方法的具体用法?Python SimpleXMLRPCServer.remove_duplicates怎么用?Python SimpleXMLRPCServer.remove_duplicates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleXMLRPCServer
的用法示例。
在下文中一共展示了SimpleXMLRPCServer.remove_duplicates方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: system_listMethods
# 需要导入模块: import SimpleXMLRPCServer [as 别名]
# 或者: from SimpleXMLRPCServer import remove_duplicates [as 别名]
def system_listMethods(self):
methods = self.funcs.keys()
if self.instance is not None:
if hasattr(self.instance, '_listMethods'):
methods = SimpleXMLRPCServer.remove_duplicates(
methods + list_public_methods(self.instance)
)
elif not hasattr(self.instance, '_dispatch'):
methods = SimpleXMLRPCServer.remove_duplicates(
methods + list_public_methods(self.instance))
示例2: system_listMethods
# 需要导入模块: import SimpleXMLRPCServer [as 别名]
# 或者: from SimpleXMLRPCServer import remove_duplicates [as 别名]
def system_listMethods(self):
"""system.listMethods() => ['add', 'subtract', 'multiple']
Returns a list of the methods supported by the server."""
methods = self.funcs.keys()
if self.instance is not None:
# Instance can implement _listMethods to return a list of
# methods
if hasattr(self.instance, '_listMethods'):
methods = SimpleXMLRPCServer.remove_duplicates(
methods + 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 = SimpleXMLRPCServer.remove_duplicates(
methods + list_public_methods(self.instance)
)
methods.sort()
return methods