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

Method _read

Lib/mailbox.py:2124–2131  ·  view source on GitHub ↗

Read size bytes using read_method, honoring start and stop.

(self, size, read_method)

Source from the content-addressed store, hash-verified

2122 _ProxyFile.seek(self, offset, whence)
2123
2124 def _read(self, size, read_method):
2125 """Read size bytes using read_method, honoring start and stop."""
2126 remaining = self._stop - self._pos
2127 if remaining <= 0:
2128 return b''
2129 if size is None or size < 0 or size > remaining:
2130 size = remaining
2131 return _ProxyFile._read(self, size, read_method)
2132
2133 def close(self):
2134 # do *not* close the underlying file object for partial files,

Callers

nothing calls this directly

Calls 1

_readMethod · 0.45

Tested by

no test coverage detected