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

Method read1

Lib/lzma.py:210–220  ·  view source on GitHub ↗

Read up to size uncompressed bytes, while trying to avoid making multiple reads from the underlying stream. Reads up to a buffer's worth of data if size is negative. Returns b"" if the file is at EOF.

(self, size=-1)

Source from the content-addressed store, hash-verified

208 return self._buffer.read(size)
209
210 def read1(self, size=-1):
211 """Read up to size uncompressed bytes, while trying to avoid
212 making multiple reads from the underlying stream. Reads up to a
213 buffer's worth of data if size is negative.
214
215 Returns b"" if the file is at EOF.
216 """
217 self._check_can_read()
218 if size < 0:
219 size = io.DEFAULT_BUFFER_SIZE
220 return self._buffer.read1(size)
221
222 def readline(self, size=-1):
223 """Read a line of uncompressed bytes from the file.

Callers

nothing calls this directly

Calls 1

_check_can_readMethod · 0.80

Tested by

no test coverage detected