base.py 文件源码

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

项目:estreamer 作者: spohara79 项目源码 文件源码
def __unpack__(self, type_, buf, _size=None):
        fmt = self.endian + type_
        size = struct.calcsize(fmt) if _size is None else _size
        try:
            unpacked = struct.unpack(fmt, buf[:size]), buf[size:]
        except struct.error as exc:
            raise_from(UnpackError("Unable to unpack structure"), exc)
        else:
            return unpacked
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号