MCPcopy Index your code
hub / github.com/RustPython/RustPython / close

Method close

Lib/mailbox.py:784–793  ·  view source on GitHub ↗

Flush and close the mailbox.

(self)

Source from the content-addressed store, hash-verified

782 return
783
784 def close(self):
785 """Flush and close the mailbox."""
786 try:
787 self.flush()
788 finally:
789 try:
790 if self._locked:
791 self.unlock()
792 finally:
793 self._file.close() # Sync has been done by self.flush() above.
794
795 def _lookup(self, key=None):
796 """Return (start, stop) or raise KeyError."""

Callers

nothing calls this directly

Calls 3

flushMethod · 0.95
unlockMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected