def WrapMethods(cls, state):
for name, func in inspect.getmembers(cls):
# NOTE: This doesn't work in python 3? Types module is different
if isinstance(func, types.UnboundMethodType):
setattr(cls, name, TracedFunc(func, cls.__name__, state))
评论列表
文章目录