methods.py 文件源码

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

项目:amqproto 作者: malinoff 项目源码 文件源码
def __init_subclass__(cls, class_id, method_id, response_to=None,
                          followed_by_content=False, closing=False, **kwargs):
        super().__init_subclass__(**kwargs)

        cls.struct = make_struct(cls)

        cls.closing = closing
        cls.followed_by_content = followed_by_content
        if followed_by_content:
            cls.content = attr.ib(default=None)
        cls.responses = []
        cls.response_to = response_to
        if response_to is not None:
            response_to.responses.append(cls)

        cls.class_id = attr.ib(default=class_id, init=False)
        cls.method_id = attr.ib(default=method_id, init=False)
        cls.channel_id = attr.ib(default=None, init=False)

        cls.BY_ID[(class_id, method_id)] = cls
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号