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

Method readinto

Lib/_pyio.py:698–710  ·  view source on GitHub ↗

Read bytes into a pre-allocated bytes-like object b. Like read(), this may issue multiple reads to the underlying raw stream, unless the latter is 'interactive'. Returns an int representing the number of bytes read (0 for EOF). Raises BlockingIOError if the underly

(self, b)

Source from the content-addressed store, hash-verified

696 self._unsupported("read1")
697
698 def readinto(self, b):
699 """Read bytes into a pre-allocated bytes-like object b.
700
701 Like read(), this may issue multiple reads to the underlying raw
702 stream, unless the latter is 'interactive'.
703
704 Returns an int representing the number of bytes read (0 for EOF).
705
706 Raises BlockingIOError if the underlying raw stream has no
707 data at the moment.
708 """
709
710 return self._readinto(b, read1=False)
711
712 def readinto1(self, b):
713 """Read bytes into buffer *b*, using at most one system call

Callers

nothing calls this directly

Calls 1

_readintoMethod · 0.95

Tested by

no test coverage detected