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

Method close

Lib/mailbox.py:791–800  ·  view source on GitHub ↗

Flush and close the mailbox.

(self)

Source from the content-addressed store, hash-verified

789 return
790
791 def close(self):
792 """Flush and close the mailbox."""
793 try:
794 self.flush()
795 finally:
796 try:
797 if self._locked:
798 self.unlock()
799 finally:
800 self._file.close() # Sync has been done by self.flush() above.
801
802 def _lookup(self, key=None):
803 """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