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

Method read

Lib/lzma.py:201–208  ·  view source on GitHub ↗

Read up to size uncompressed bytes from the file. If size is negative or omitted, read until EOF is reached. Returns b"" if the file is already at EOF.

(self, size=-1)

Source from the content-addressed store, hash-verified

199 return self._buffer.peek(size)
200
201 def read(self, size=-1):
202 """Read up to size uncompressed bytes from the file.
203
204 If size is negative or omitted, read until EOF is reached.
205 Returns b"" if the file is already at EOF.
206 """
207 self._check_can_read()
208 return self._buffer.read(size)
209
210 def read1(self, size=-1):
211 """Read up to size uncompressed bytes, while trying to avoid

Callers 5

test_closedMethod · 0.95
test_seekableMethod · 0.95
test_readableMethod · 0.95
test_writableMethod · 0.95

Calls 1

_check_can_readMethod · 0.80

Tested by 5

test_closedMethod · 0.76
test_seekableMethod · 0.76
test_readableMethod · 0.76
test_writableMethod · 0.76