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

Method _readinto

Lib/_pyio.py:723–736  ·  view source on GitHub ↗
(self, b, read1)

Source from the content-addressed store, hash-verified

721 return self._readinto(b, read1=True)
722
723 def _readinto(self, b, read1):
724 if not isinstance(b, memoryview):
725 b = memoryview(b)
726 b = b.cast('B')
727
728 if read1:
729 data = self.read1(len(b))
730 else:
731 data = self.read(len(b))
732 n = len(data)
733
734 b[:n] = data
735
736 return n
737
738 def write(self, b):
739 """Write the given bytes buffer to the IO stream.

Callers 2

readintoMethod · 0.95
readinto1Method · 0.95

Calls 3

read1Method · 0.95
readMethod · 0.95
castMethod · 0.80

Tested by

no test coverage detected