NNTPContent.py 文件源码

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

项目:newsreap 作者: caronc 项目源码 文件源码
def tell(self):
        """
        Allows reference to our object from within a Codec()

        """
        if not self.filepath:
            # If there is no filepath, then we're probably dealing with a
            # stream in memory like a StringIO or BytesIO stream.
            if self.stream:
                # Advance to the end of the file
                return self.stream.tell()

        else:
            if self.stream and self._dirty is True:
                self.stream.flush()
                self._dirty = False

        if not self.stream:
            if not self.open(mode=NNTPFileMode.BINARY_RO):
                return None

        return self.stream.tell()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号