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

Method get

Lib/mailbox.py:64–69  ·  view source on GitHub ↗

Return the keyed message, or default if it doesn't exist.

(self, key, default=None)

Source from the content-addressed store, hash-verified

62 raise NotImplementedError('Method must be implemented by subclass')
63
64 def get(self, key, default=None):
65 """Return the keyed message, or default if it doesn't exist."""
66 try:
67 return self.__getitem__(key)
68 except KeyError:
69 return default
70
71 def __getitem__(self, key):
72 """Return the keyed message; raise KeyError if it doesn't exist."""

Callers 2

test_notimplementedMethod · 0.95
get_flagsMethod · 0.45

Calls 1

__getitem__Method · 0.95

Tested by 1

test_notimplementedMethod · 0.76