encoding.py 文件源码

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

项目:aws-encryption-sdk-cli 作者: awslabs 项目源码 文件源码
def readlines(self, hint=-1):
        # type: (int) -> List[bytes]
        """Read and return a list of lines from the stream. hint can be specified to control
        the number of lines read: no more lines will be read if the total size (in bytes/
        characters) of all lines so far exceeds hint.

        :type hint: int
        :returns: Lines of data
        :rtype: list of bytes
        """
        lines = []
        for line in self:  # type: ignore
            lines.append(line)
            if hint > 0 and len(lines) * io.DEFAULT_BUFFER_SIZE > hint:
                break
        return lines
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号