xmlrpc_proxy.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:taf 作者: taf3 项目源码 文件源码
def __call__(self, *args):
        """Configuring calls.

        """
        try:
            call_info = str(gc.get_referents(self))
            subst1 = "ServerProxy for "
            subst2 = ">>"
            proxy = call_info[call_info.find(subst1) + len(subst1):call_info.find(subst2)]
            if len(args) == 0:
                meth = "%s()" % self.__name
            elif len(args) == 1:
                if args[0] == "":
                    meth = "%s('')" % self.__name
                else:
                    meth = "%s(%s)" % (self.__name, ",".join(map(str, args)))
            else:
                meth = "%s%s" % (self.__name, args)
            if "__repr__" not in meth:
                self.class_logger.debug("%s.%s" % (proxy, meth))
        except Exception:
            pass

        return self.__send(self.__name, args)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号