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

Method get_bytes

Lib/mailbox.py:395–398  ·  view source on GitHub ↗

Return a bytes representation or raise a KeyError.

(self, key)

Source from the content-addressed store, hash-verified

393 return msg
394
395 def get_bytes(self, key):
396 """Return a bytes representation or raise a KeyError."""
397 with open(os.path.join(self._path, self._lookup(key)), 'rb') as f:
398 return f.read().replace(linesep, b'\n')
399
400 def get_file(self, key):
401 """Return a file-like representation or raise a KeyError."""

Callers

nothing calls this directly

Calls 5

_lookupMethod · 0.95
openFunction · 0.70
joinMethod · 0.45
replaceMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected