MCPcopy Create free account
hub / github.com/EasyIME/PIME / append

Method append

python/python3/tornado/iostream.py:139–159  ·  view source on GitHub ↗

Append the given piece of data (should be a buffer-compatible object).

(self, data: Union[bytes, bytearray, memoryview])

Source from the content-addressed store, hash-verified

137 _large_buf_threshold = 2048
138
139 def append(self, data: Union[bytes, bytearray, memoryview]) -> None:
140 """
141 Append the given piece of data (should be a buffer-compatible object).
142 """
143 size = len(data)
144 if size > self._large_buf_threshold:
145 if not isinstance(data, memoryview):
146 data = memoryview(data)
147 self._buffers.append((True, data))
148 elif size > 0:
149 if self._buffers:
150 is_memview, b = self._buffers[-1]
151 new_buf = is_memview or len(b) >= self._large_buf_threshold
152 else:
153 new_buf = True
154 if new_buf:
155 self._buffers.append((False, bytearray(data)))
156 else:
157 b += data # type: ignore
158
159 self._size += size
160
161 def peek(self, size: int) -> memoryview:
162 """

Callers 15

addButtonMethod · 0.45
removeButtonMethod · 0.45
changeButtonMethod · 0.45
addPreservedKeyMethod · 0.45
removePreservedKeyMethod · 0.45
server.pyFile · 0.45
__init__Method · 0.45
__init__Method · 0.45
getKeyNameListMethod · 0.45
haveNextCharDefMethod · 0.45
__init__Method · 0.45
initTextServiceMethod · 0.45

Calls

no outgoing calls

Tested by 15

handle_streamMethod · 0.36
setUpMethod · 0.36
tearDownMethod · 0.36
testMethod · 0.36
callbackMethod · 0.36
test_notify_1Method · 0.36
test_notify_allMethod · 0.36
fMethod · 0.36
fMethod · 0.36
fMethod · 0.36
consumerMethod · 0.36
header_callbackMethod · 0.36