baseio.py 文件源码

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

项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码
def write(self, bl, **kargs):
        if Block in self.writeable_objects:
            if isinstance(bl, collections.Sequence):
                assert hasattr(self, 'write_all_blocks'), \
                    '%s does not offer to store a sequence of blocks' % \
                    self.__class__.__name__
                self.write_all_blocks(bl, **kargs)
            else:
                self.write_block(bl, **kargs)
        elif Segment in self.writeable_objects:
            assert len(bl.segments) == 1, \
                '%s is based on segment so if you try to write a block it ' + \
                'must contain only one Segment' % self.__class__.__name__
            self.write_segment(bl.segments[0], **kargs)
        else:
            raise NotImplementedError

    ######## All individual read methods #######################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号