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

Method peek

Lib/http/client.py:697–704  ·  view source on GitHub ↗
(self, n=-1)

Source from the content-addressed store, hash-verified

695 return result
696
697 def peek(self, n=-1):
698 # Having this enables IOBase.readline() to read more than one
699 # byte at a time
700 if self.fp is None or self._method == "HEAD":
701 return b""
702 if self.chunked:
703 return self._peek_chunked(n)
704 return self.fp.peek(n)
705
706 def readline(self, limit=-1):
707 if self.fp is None or self._method == "HEAD":

Callers 1

_peek_chunkedMethod · 0.45

Calls 1

_peek_chunkedMethod · 0.95

Tested by

no test coverage detected