MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __getitem__

Method __getitem__

tools/python-3.11.9-amd64/Lib/mailbox.py:71–77  ·  view source on GitHub ↗

Return the keyed message; raise KeyError if it doesn't exist.

(self, key)

Source from the content-addressed store, hash-verified

69 return default
70
71 def __getitem__(self, key):
72 """Return the keyed message; raise KeyError if it doesn't exist."""
73 if not self._factory:
74 return self.get_message(key)
75 else:
76 with contextlib.closing(self.get_file(key)) as file:
77 return self._factory(file)
78
79 def get_message(self, key):
80 """Return a Message representation or raise a KeyError."""

Callers 1

getMethod · 0.95

Calls 2

get_messageMethod · 0.95
get_fileMethod · 0.95

Tested by

no test coverage detected