agent.py 文件源码

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

项目:osbrain 作者: opensistemas-hub 项目源码 文件源码
def _curate_handler(self, handler):
        if isinstance(handler, str):
            handler = getattr(self, handler)
        function_type = (types.FunctionType, types.BuiltinFunctionType)
        if isinstance(handler, function_type):
            return handler
        method_type = (types.MethodType, types.BuiltinMethodType)
        if isinstance(handler, method_type):
            return unbound_method(handler)
        raise TypeError('Unknown handler type "%s"' % type(handler))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号