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

Method get_file

Lib/mailbox.py:865–871  ·  view source on GitHub ↗

Return a file-like representation or raise a KeyError.

(self, key, from_=False)

Source from the content-addressed store, hash-verified

863 return string.replace(linesep, b'\n')
864
865 def get_file(self, key, from_=False):
866 """Return a file-like representation or raise a KeyError."""
867 start, stop = self._lookup(key)
868 self._file.seek(start)
869 if not from_:
870 self._file.readline()
871 return _PartialFile(self._file, self._file.tell(), stop)
872
873 def _install_message(self, message):
874 """Format a message and blindly write to self._file."""

Callers

nothing calls this directly

Calls 5

_PartialFileClass · 0.85
_lookupMethod · 0.45
seekMethod · 0.45
readlineMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected