netpycos.py 文件源码

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

项目:pycos 作者: pgiri 项目源码 文件源码
def __init__(self, method, name=None):
        """'method' must be generator method; this is used to create tasks. If
        'name' is not given, method's function name is used for registering.
        """
        if not inspect.isgeneratorfunction(method):
            raise RuntimeError('RTI method must be generator function')
        self._method = method
        if name:
            self._name = name
        else:
            self._name = method.__name__
        if not RTI._pycos:
            RTI._pycos = Pycos.instance()
        self._location = None
        self._mid = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号