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

Function read_exact

Lib/test/xpickle_worker.py:28–35  ·  view source on GitHub ↗
(f, n)

Source from the content-addressed store, hash-verified

26 exec(sources, vars(test_module))
27
28def read_exact(f, n):
29 buf = b''
30 while len(buf) < n:
31 chunk = f.read(n - len(buf))
32 if not chunk:
33 raise EOFError
34 buf += chunk
35 return buf
36
37in_stream = getattr(sys.stdin, 'buffer', sys.stdin)
38out_stream = getattr(sys.stdout, 'buffer', sys.stdout)

Callers 1

xpickle_worker.pyFile · 0.70

Calls 1

readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…