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

Method _read_readable

Lib/http/client.py:1097–1106  ·  view source on GitHub ↗
(self, readable)

Source from the content-addressed store, hash-verified

1095 self._buffer.append(s)
1096
1097 def _read_readable(self, readable):
1098 if self.debuglevel > 0:
1099 print("reading a readable")
1100 encode = self._is_textIO(readable)
1101 if encode and self.debuglevel > 0:
1102 print("encoding file using iso-8859-1")
1103 while datablock := readable.read(self.blocksize):
1104 if encode:
1105 datablock = datablock.encode("iso-8859-1")
1106 yield datablock
1107
1108 def _send_output(self, message_body=None, encode_chunked=False):
1109 """Send the currently buffered request and clear the buffer.

Callers 1

_send_outputMethod · 0.95

Calls 3

_is_textIOMethod · 0.95
readMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected