decoders.py 文件源码

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

项目:jumpscale_portal 作者: jumpscale7 项目源码 文件源码
def finalize(self):
        """Finalize this object.  This should be called when no more data
        should be written to the stream.  This function will not raise any
        exceptions, but it may write more data to the underlying object if
        there is data remaining in the cache.

        If the underlying object has a `finalize()` method, this function will
        call it.
        """
        # If we have a cache, write and then remove it.
        if len(self.cache) > 0:
            self.underlying.write(binascii.a2b_qp(self.cache))
            self.cache = b''

        # Finalize our underlying stream.
        if hasattr(self.underlying, 'finalize'):
            self.underlying.finalize()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号