阅读背景:

python写rpc框架实用技巧

来源:互联网 
class TestClass(object): def __init__(self): super(TestClass, self).__init__() def __getattr__(self, item): def call(self, *args, **kwargs): info = { 'called_name': item, 'args': args } print info setattr(TestClass, item, call) return getattr(self, item) a = TestClass() a.cnmd('hello world') a.nmbs(1, 2, 3, '4') class TestClass(object): def __init__(self): supe



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: