MCPcopy Index your code
hub / github.com/RustPython/RustPython / _safe_readinto

Method _safe_readinto

Lib/http/client.py:667–673  ·  view source on GitHub ↗

Same as _safe_read, but for reading into a buffer.

(self, b)

Source from the content-addressed store, hash-verified

665 raise IncompleteRead(data.getvalue(), amt - data.tell())
666
667 def _safe_readinto(self, b):
668 """Same as _safe_read, but for reading into a buffer."""
669 amt = len(b)
670 n = self.fp.readinto(b)
671 if n < amt:
672 raise IncompleteRead(bytes(b[:n]), amt-n)
673 return n
674
675 def read1(self, n=-1):
676 """Read with at most one underlying system call. If at least one

Callers 1

_readinto_chunkedMethod · 0.95

Calls 3

lenFunction · 0.85
IncompleteReadClass · 0.85
readintoMethod · 0.45

Tested by

no test coverage detected