MCPcopy Index your code
hub / github.com/python/cpython / readlines

Method readlines

Lib/bz2.py:208–220  ·  view source on GitHub ↗

Read a list of lines of uncompressed bytes from the file. size can be specified to control the number of lines read: no further lines will be read once the total size of the lines read so far equals or exceeds size.

(self, size=-1)

Source from the content-addressed store, hash-verified

206 return self._buffer.readline(size)
207
208 def readlines(self, size=-1):
209 """Read a list of lines of uncompressed bytes from the file.
210
211 size can be specified to control the number of lines read: no
212 further lines will be read once the total size of the lines read
213 so far equals or exceeds size.
214 """
215 if not isinstance(size, int):
216 if not hasattr(size, "__index__"):
217 raise TypeError("Integer argument expected")
218 size = size.__index__()
219 self._check_can_read()
220 return self._buffer.readlines(size)
221
222 def write(self, data):
223 """Write a byte string to the file.

Callers

nothing calls this directly

Calls 2

_check_can_readMethod · 0.80
__index__Method · 0.45

Tested by

no test coverage detected