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

Method push

Lib/test/support/asynchat.py:199–209  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

197 self.close()
198
199 def push(self, data):
200 if not isinstance(data, (bytes, bytearray, memoryview)):
201 raise TypeError('data argument must be byte-ish (%r)',
202 type(data))
203 sabs = self.ac_out_buffer_size
204 if len(data) > sabs:
205 for i in range(0, len(data), sabs):
206 self.producer_fifo.append(data[i:i+sabs])
207 else:
208 self.producer_fifo.append(data)
209 self.initiate_send()
210
211 def push_with_producer(self, producer):
212 self.producer_fifo.append(producer)

Callers

nothing calls this directly

Calls 2

initiate_sendMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected