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

Method read1

Lib/gzip.py:349–358  ·  view source on GitHub ↗

Implements BufferedIOBase.read1() Reads up to a buffer's worth of data if size is negative.

(self, size=-1)

Source from the content-addressed store, hash-verified

347 return self._buffer.read(size)
348
349 def read1(self, size=-1):
350 """Implements BufferedIOBase.read1()
351
352 Reads up to a buffer's worth of data if size is negative."""
353 self._check_not_closed()
354 self._check_read("read1")
355
356 if size < 0:
357 size = io.DEFAULT_BUFFER_SIZE
358 return self._buffer.read1(size)
359
360 def readinto(self, b):
361 self._check_not_closed()

Callers

nothing calls this directly

Calls 2

_check_readMethod · 0.95
_check_not_closedMethod · 0.80

Tested by

no test coverage detected