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

Method to_bytes

python/python3/tornado/test/iostream_test.py:1204–1210  ·  view source on GitHub ↗
(self, b)

Source from the content-addressed store, hash-verified

1202 self.random = random.Random(42)
1203
1204 def to_bytes(self, b):
1205 if isinstance(b, (bytes, bytearray)):
1206 return bytes(b)
1207 elif isinstance(b, memoryview):
1208 return b.tobytes() # For py2
1209 else:
1210 raise TypeError(b)
1211
1212 def make_streambuffer(self, large_buf_threshold=10):
1213 buf = _StreamBuffer()

Callers 4

check_peekMethod · 0.95
filename_to_strFunction · 0.80
initPipeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected