MCPcopy Create free account
hub / github.com/ccxt/ccxt / StringIO

Class StringIO

python/ccxt/static_dependencies/msgpack/fallback.py:18–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 USING_STRINGBUILDER = True
17
18 class StringIO:
19 def __init__(self, s=b""):
20 if s:
21 self.builder = StringBuilder(len(s))
22 self.builder.append(s)
23 else:
24 self.builder = StringBuilder()
25
26 def write(self, s):
27 if isinstance(s, memoryview):
28 s = s.tobytes()
29 elif isinstance(s, bytearray):
30 s = bytes(s)
31 self.builder.append(s)
32
33 def getvalue(self):
34 return self.builder.build()
35
36else:
37 USING_STRINGBUILDER = False

Callers 6

__init__Method · 0.85
packMethod · 0.85
pack_map_pairsMethod · 0.85
pack_array_headerMethod · 0.85
pack_map_headerMethod · 0.85
resetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…